See the jquery verification framework, in the use of the time, in fact, is still very dizzy, very troublesome, the use of the time code is not concise, so have to get a own jquery verification framework of the plan, the basic principle is to input,
What is cross-domain JavaScript is not allowed to call objects on other pages across domains for security reasons. But it also brings a lot of trouble to injecting IFRAME or AJAX applications at the same time as security restrictions. Here's a quick
In JavaScript we need to use a lot of trim, but JavaScript has no independent trim function or method to use, so we need to write a trim function to achieve our goal. programme I: A prototype invocation, Obj.trim (), is simple and widely used, and
Example
The code is as follows
Copy Code
var tel = 18767802354;var reg =/^0?1[3|4|5|8][0-9]\d{8}$/;if (Reg.test (tel)) {Alert ("Correct number ~");}else{Alert ("Wrong number ~");};
Match the phone number at the
Now in conjunction with an article on the Web, review the scope of this thing. Scopes and contexts are not the same thing, and many people may confuse it. Each function call is associated with a scope and a context. Fundamentally, scopes are based
Implementation principle
The realization of this function is very simple, in a nutshell is to find a place to save some information on the page, if the page two times are visited, the new content to cover up the old content; When the page loads,
The LEVEL2 core of the consortium DOM provides that the CreateElement method under the Document interface can create an instance of an element node object. It can pass in a string parameter tagName, in HTML, this parameter can be any form, but
Look at the code
The code is as follows
Copy Code
js practicesimple HTML pagethis is a very simple HTML page.it ' s about as basic as they come. It has: an H1 tagtwo paragraphsan unordered list
Only in Google
JS Example Tutorial: JavaScript Events method
The action of the event, can detect the JavaScript.
ActivitiesBy using JavaScript, we have the ability to create dynamic Web pages. The action of the event, can detect the JavaScript.
Each element has
The number of times specified to execute the same code block in JavaScript or the specified condition is true.
ExampleWhileHow to write a while loop. Use the while loop to run the same code block, and the specified condition is true.
Html>
A regular expression is a literal pattern consisting of ordinary characters (such as characters A through Z) and special characters (called metacharacters). This pattern describes one or more strings to be matched when looking for a text body. A
In JavaScript, arrays are not stored directly as cookies (PHP can), and that is to dump the array into a string, and then save it in a cookie, and we can use either ToString () or join directly on the simple one-dimensional array:The ToString
A few days ago, the project has a function and a treasure shopping to pay the password of the input box a bit similar, wrote this blog, right when the summary notes.
?? Kidnap policeman was stationed soy play with benzene by washing
ES6 is extended for numeric types (number):1. A new notation for binary and octalES6 provides a new notation for binary and octal values, expressed in 0b (or 0B) and 0o (or 0o) respectively. For example:0b111110111 = = = 503 // true= = = 503
What is an event?Event is the heart of the JavaScript app beating and the glue that sticks everything together. Events occur when we interact with certain types of Web pages in the browser. An event might be a user's click on something, a mouse
Come to the conclusion first!Variable assignment:Base type: passed by value (that is, a copy is copied)Reference type: passed by reference (that is, a reference to the object is passed)Parameter passingBase type: passed by value (that is, a copy is
Javascript Strict mode details turn from: Ruan Yi FengI. OverviewIn addition to the normal operating mode, ECMAscript 5 adds a second mode of operation: "Strict mode" (strict). As the name implies, this mode allows JavaScript to run under stricter
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