JS verification is a number, the easiest way:
Use of the isNaN function:
function Checknum () {if (isNaN (Frm.num.value)) {Alert ("Please enter a number");Frm.num.focus ();
return false;}}
The most complete and accurate method: (Regular
Tired of the Internet Explorer Warning window, with a "boom" of fear, it feels as if there is a bad thing coming. And now the browser to the pop-up warning box (alert), Confirmation dialog box (confirm), input box (prompt) display different, this
var arr = ["One", "two", "three", "four"];
$.each (arr, function () {
alert (this);
});
The results of each output above are: One,two,three,four
var arr = ["AAA", "BBB", "CCC"];
$.each (arr, function (i,a) {
alert (i);//I is circular
JS Object Introduction:
First, the basic concept
1, customize the object.According to the JS object extension mechanism, users can customize the JS object, which is similar to the Java language.Corresponding to the custom object is the JS standard
Chew a few days of JS related, learn the process found in the binding event in jquery, someone with bind (), someone with on (), someone with delegate (), and someone with live (), look at the code when they feel all realize the function has been
This article illustrates the way in which jquery realizes the switching function of the corporate site banner Focus map. Share to everyone for your reference. as follows:
jquery Fade Fade in with thumbnail slide "
I
$.each () and $ (selector). each () differs in that the latter is dedicated to the traversal of the jquery object, which can be used to traverse any set (whether an array or an object), and, if it is an array, the callback function passes in the
This article is an example of how jquery realizes the daily weather of Tencent micro-blog slip effect report. Share to everyone for your reference. The specific analysis is as follows:
This is the imitation of Tencent Weibo effect of the daily
First of all, the use of JS dynamically generated checkbox can be similar to the following statements:
Copy Code code as follows:
var checkbox=document.createelement ("input");
Checkbox.setattribute ("Type", "checkbox");
This paper illustrates the method of jquery dynamic effect displaying character structure diagram. Share to everyone for your reference. The specific analysis is as follows:
This is a figure diagram, can be displayed dynamically, the effect is very
This example describes the jquery control radio selection method. Share to everyone for your reference. Specifically as follows:
Method 1:
$ (function () {
$ ("#spanNan"). Click (function () {
$ ("#Radio1"). attr ("Checked", true);
Today to do a project, encountered a problem, is not encountered before, to write a note on this.
1, Trigger method explanation
This is the official explanation:
Copy Code code as follows:
Description:execute all handlers and
Copy Code code as follows:
#p_box包括 #p_cont, when you click anywhere in the #p_box area (including #p_cont), a event will be triggered. If you want to block a event from clicking on the #p_cont area, you need to include code that
Share a pop-up flip effect code based on jquery images. This is based on JQUERY+HTML5 implementation, which contains six different effects of the mouse click on the picture pop-up effects download. The effect chart is as follows:
Introduce CSS
Accidentally saw the previous do a simple div drag-and-drop effect, modified a little bit of comment, after testing the perfect through the firefox/chrome/ie6-11, now to share.
First of all, the implementation of the principles and points, the main
The examples in this article describe the way jquery replaces DOM nodes. Share to everyone for your reference. The specific analysis is as follows:
If you are replacing a node, jquery provides the appropriate method, namely ReplaceWith () and
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