I. 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 conditions.The purpose of setting up a "strict mode" is
This in JavaScript, when we were just touching JavaScript, everyone was doing a lot of talking about how smart and important it was, but they didn't care; with their own step-by-step understanding of JavaScript, it suddenly dawned, it really is very
A regular expression is an object that describes a character pattern, and the RegExp class of JavaScript represents a regular expression, and both string and RegExp define methods, which use regular expressions for powerful pattern matching and text
JavaScript operatorsA combination of operators and operands is called an expression.Second, JavaScript operators(i) Arithmetic operators+-*/% var++ ++var var----varA. +(1) Operations for numeric values(2) Connection for strings***********************
1. JavaScript subsetThe definition of a subset of JavaScript is mostly for security reasons, and only a secure subset of the language is used to script the code to make it more secure and stable, such as how to perform a more secure ad code that is
Match numbers and strings
Integer or decimal: ^[0-9]+\. {0,1} [0-9] {0,2}$
Only numbers can be entered: "^[0-9]*$".
Only n digits can be entered: "^\d{n}$".
Only numbers with at least n digits can be entered: "^\d{n,}$".
You
Example one:function message () { try { adddlert ("Welcome guest!") ) } catch(err) { txt= "There is an error on this page. \ n \ nthe " txt+ =" Error description: "+ Err.Description +" \ n " txt + =" Click OK to continue. \ n \ nthe "
1. Document.referrer can get the address of the previous page and use Document.anchors to get all the link elements on the page without having to use document.getElementsByTagName (' A '); The same reason is document.forms, document.images.2.
JavaScript has a very useful function of eval ("string")This function can convert a string into an object or a statement that can be executed, such as your code can be usedObj2=eval ("DOCUMENT.A.C" +i), in addition you can also write eval ("alert ()"
The CommonJS (http://www.commonjs.org/) specification provides a good vision for JavaScript-hopefully JavaScript will run anywhere.I. JavaScript changes and Status quo Tools (Browser-compatible)--components (function Modules)--Framework (functional
For example, when JavaScript performs read/write operations on cookies, javascriptcookie
This example describes how JavaScript reads and writes cookies. Share it with you for your reference. The details are as follows:
No js library is used here.
CSS obfuscation knowledge points summary and sharing-positioning and layout, css knowledge points
CSS positioning has four modes: static, relative, absolute, and fixed. Other static values are default values. The following describes their respective
Add, delete, modify, and query information using javascript.
This example describes how to add, delete, modify, and query information in javascript. Share it with you for your reference. The specific implementation method is as follows:
display
Style failure caused by CSS priority selection, css priority Style
Style invalidation caused by the priority of the separator:
Because the CSS selection operator priority may cause some styles to fail, this problem may be encountered by beginners,
Javascript Ajax to obtain and set Headers
Header-related methods in the XMLHttpRequest object:
SetRequestHeader (
,
) -- Set the header with the specified value;
GetResponseHeader (
) -- Get the value of the specified
Node. js operates mysql (add, delete, modify, and query) and node. jsmysql
Recently, I have been studying Node for a while. Although it is a bit simple, I think it is a good idea. In fact, all projects are addition, deletion, modification, and query,
[Original] CSS summary !! The second article about HTML !!, Css Article 2
Similarly, I used xMind to upload CSS and DIV tomorrow. Today, only CSS is available.
But first, it involves the browser principle: there are still many modules that you don't
JavaScript checks the size of uploaded files.
This example describes how to check the size of uploaded files by using JavaScript. Share it with you for your reference. The details are as follows:
The JS client Code restricts the size of files
How does CSS hide excess content?
How does CSS hide excess content:
Sometimes the content in the container will go beyond the container's boundary, which is very difficult to see. Therefore, you need to hide the excess content. The following
Basic JS types and reference types
Js:
1. The ECMAScript variable contains two different types of values: basic type value and reference type value;
2. Basic Type value: refers to the simple data segment stored in the stack memory;
3. Reference Type
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