JavaScript check picture size don't let big picture burst page

Source: Internet
Author: User

How to use JavaScript to determine the size of the picture, in fact, as long as a simple function can be written, of course, so how to write a lot of people may not know. found that the use of ASP to determine the size of the picture yaks still complicated, and judged on the judgment, but also the logical display ... Bother. Use Javascript to judge, easy to handle, the ultimate effect is nothing but the big picture to burst the page.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 The <script language= "JAVASCRIPT" >   /Check picture size Greater than expected size, greater than expected size    function show (chkw) {//chk images width    if (chkw>500) {   chk w=500;   }    else {   chkw=chkw   }    return chkw;   }//shawl.qiu script   //example    </script>    1." Mouse Automatically selected check box:    <input type= checkbox "Onmousemove=" Checked=true ">    <input type=" checkbox "onmousemove=" Checked=true ">    2.ACCESS list days of day of week   //This algorithm can cost me a few hours    Query data for all days of the week for a date    SELECT *    from ctdate_by_query_date    WHERE DateAndTime bet Ween ((#2006 -5-15#+weekday (2006-5-15))-6) and #2006 -5-15#+weekday (2006-5-15)    3. Double-click the mouse to copy the text, now double click on the clear    <script language= "JAVASCRIPT" >    function ClipBoard (tdobj) {//ie only    var holdtext = document.all[' Holdtext '];    holdtext.innertext = Tdobj.innertext;    Copied = Holdtext.createtextrange ();    Copied.execcommand ("Copy");    alert ("text copied");       </script>    <form name= "Form1" method= "Post" action= "" >    <ttextarea id= "Holdtext" style= "Display:none" rows= "ten" ></ttextarea>    </form>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.