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

Source: Internet
Author: User

How to use JavaScript to determine the size of a picture, in fact, as long as a simple function can be written, of course, 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.

<script language= "JAVASCRIPT" >//Check whether the picture size is greater than the expected size, or greater than the expected size function show (chkw) {//chk images width if (chkw>

) {chkw=500;

else {chkw=chkw;

return chkw; }//shawl.qiu script//example  </ Script> 1. The mouse is automatically selected check box: <input type= "checkbox" onmousemove= "Checked=true" > <input "checkbox" Onmousemove= "Checked=true" > 2.ACCESS lists the days of the week for a day//the algorithm can cost me a couple of hours. Query a date for all days of the week of data SELECT * from Ctdate_by_query_ Date WHERE DateAndTime between ((#2006 -5-15#+weekday (2006-5-15))-6) and #2006 -5-15#+weekday (2006-5-15) 3. Double-click the mouse copy text, and now double click to 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.