Very beautiful JS + CSS image magic light switching special effects, used in your home page is relatively good, wide screen image format, each picture smoothly fly in switch, put the mouse on automatic switch, and FLASH smooth effect is similar, the
For WEB development, form verification is essential, so we list some common verifications today. Haha, The JS regular expression we just learned this afternoon, I hope you can criticize and correct any shortcomings.
I. Related codeCopy codeThe Code
1: GET access to the browser is considered to be idempotentIt means that the same URL has only one result. [the same means that the whole URL string is exactly matched]Therefore, if the URL string remains unchanged during the second visit, the
Recently, website development page statistics have been developed in the past, but the functions are not very full. Therefore, we will use some good functions this time.For example, in this case, the JS cursor/mouse coordinates of the page may ask
When jquery is used to process html5 applications, it is normal to test in firefox all the time, and garbled characters are reported when users use pad for access,I tried it myself and found that this problem exists in chrome and ie kernel. When the
I. document. formName. item ("itemName ")Problem description: in IE, you can use document. formName. item ("itemName") or document. formName. elements ["elementName"]; In Firefox, only document. formName. elements ["elementName"].Solution: Use
For example, when processing an event, you sometimes need to know the number of subnodes currently clicked, And the html dom itself does not directly provide the corresponding attributes, which must be calculated by yourself.From an index serial
All the code snippets that need to be used first (captured)Copy codeThe Code is as follows:MenuControl. prototype. boxDisplay = false; // whether to display the layer selection menuMenuControl. prototype. controlUI;MenuControl. prototype. show =
Copy codeThe Code is as follows: After you insert the highlighted red content to a webpage, you can right-click the page to make it invalid.Onselectstart = "return false" prohibit selection, ondragstart = "return false" prohibit drag and drop,
The previous event encountered a strange problem. I wrote an onload event on the jsp page and found that it did not work. I checked the source file and there was no method name after bady's onload ???Puzzling,So the testCopy codeThe Code is as
Copy codeThe Code is as follows: jQuery table automatically added
NO. name amount [USD] time > Project Unit remarks 1
Run the command to see the effect.
The onbeforeunload event is used as follows:
Copy codeThe Code is as follows:
In this way, the onbeforeunload event is triggered every time the browser window is closed or the page is refreshed.
The excerpt is as follows: onbeforeunload event:
Note:
When an asynchronous request is used, it is sometimes necessary to return the result of the asynchronous request to another js function. In this case, the asynchronous request is not returned, the js function that sends the request has completed
1. Math. random (); the result is a random number (including 0, not 1) between 0 and 1. Math. random (); the result is a random number (including 0, not 1) between 0 and 1. [html] view plaincopyprint?2. Math. floor (num); The num parameter is a
A good program is a favorite program. Good programmers are lazy programmers. Yesterday I studied Jquery's prompt to automatically add search results when imitating Baidu and Google searches, and I felt that the results were okay. I would like to
The PHP Array Function in_array () is very convenient, but JS is not. Actually, I do not like JS arrays ~Let's just move on.Copy codeThe Code is as follows:Array. prototype. in_array = function (e){For (I = 0; I {If (this [I] = e)Return true;}Return
IDrag & iDialog IntroductionFeatures:IDialog. js depends on jquery's easy-to-use dialog box. You can also add css3 to change the display animation of the dialog box. Two methods are provided:
• 1. drag functions iDrag () or $. drag ();• 2. the
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