Javascript function to check whether the picture size is greater than the expected size

Source: Internet
Author: User
Tags copy
javascript| function

Title: Javascript function to check whether the picture size is greater than the expected size, or greater than the expected size by STABX

Body:

QUOTE:

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 ... Use Javascript to judge, easy to handle, the ultimate effect is nothing more than let the big picture burst page.

CODE:

 <script language= "JAVASCRIPT" >
//Check that the picture size is greater than the expected size, or greater than the expected size
function show (CHKW) {//chk images width
             if (chkw>500) {
                 chkw=500;
                }
             else {
                  chkw=chkw;
            }
             return chkw;
        }//shawl.qiu Script
//example </script>

CODE:

Sticking head

1. The mouse has been automatically selected check box:

<input type= "checkbox" onmousemove= "Checked=true" >
<input type= "checkbox" onmousemove= "Checked=true" >

2.ACCESS list the days of the week to which the day belongs

This algorithm can cost me an hour.

Query data for all days of the week that a date belongs to

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, 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>



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.