We recommend that you use encodeURIComponent (), GET, and POST to send the URL encoding of variable values.There are several methods in JavaScript to encode URL strings: escape (), encodeURI (), and encodeURIComponent (). These encodings play
ECMA-262 (E3)The JSON concept is not written to the standard.ECMA-262 (E5)The concept of JSON in is formally introduced, including the Global JSON object and the toJSON method of Date.
1. eval parsing. I'm afraid this is the earliest parsing method.
In javascript, the scope of variables is defined by functions. variables are valid within a function range. For example:Copy codeThe Code is as follows:Var f = false;If (true) {var f = true;} // at this time, f is located within the if, that is,
1. Delay switching tabRequirement: There are several tabs on the page. When you switch to a tab, the data in a specific area is pulled and updated.Disadvantage: You can quickly switch from the first tab to the end, and then generate n ajax requests.
Therefore, we need to use currentStyle of IE and getPropertyValue of W3C to obtain it.Elem. style. the method for retrieving styles by attr is not mentioned. first, let's look at the currentStyle method. This object exclusive to ie represents the
Add the following lines to function tb_show (caption, url, imageGroup) of about 39 rows of wp-shortdes/js/thickbox. js (the bold red word indicates the newly added code)Copy codeThe Code is as follows:Function tb_show (caption, url, imageGroup) {//
1. Each node in the document has the attributes nodeName, nodeValue, and nodeType.The node name of the nodeName text node is # text, and nodeName is a read-only attribute.NodeValue 1 Element Node 2 attribute node 3 text node read-only
Copy codeThe Code is as follows:It is very interesting for IE detection.The above code is compiled from the Extjs script, which can be used instead of Ext. onReady.
Javascript code, usually put in the headCopy codeThe Code is as follows:Put the following code into the body.Copy codeThe Code is as follows: educational significance × --> Specific implementation code testing: script house ×
I. JS partCopy codeThe Code is as follows://************************************** ******************// Creation date:// OPERATOR: oloen// Content Description: Automatically complete the JS class// Usage:// Var auto = new autoComplete (Client ID );//
How to refresh the page with Javascript:Copy codeThe Code is as follows:1 history. go (0)2 location. reload ()3 location = location4 location. assign (location)5 document.exe cCommand ('refresh ')6 window. navigate (location)7 location. replace
Okay. Let's see how anonymous functions are called.1. Call the function to obtain the returned value after executionJs CodeCopy codeThe Code is as follows:// Method 1: Call the function to obtain the returned value. Forced operator for function call
Copy codeThe Code is as follows: No title page 1 2 3 4 1 2 3 4 PS:$ (Document). ready () can be replaced directly with $ (fn) because of many application scenarios. fn indicates the processing function. (The ready processing function appears
The first method is to control the font size of the text, which is divided into big, medium, and small. Generally, You need to specify the id Font: www.jb51.net. [Ctrl + A select all Note: If you need to introduce external Js, You need to
Click Show/hide layer // code from www.jb51.net script programming base. You are welcome to learn and exchange. [-] [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
1. directly use the ID attribute for Reference test1 myDiv [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]The code above indicates that the test table is valid in IE and Firefox.2.
For example:1. document. all () does not work in FF. It must be changed to document. getElementById ();2. obj. innerText = "XXX"; in FF, it seems that there are occasional problems. Change to obj. innerHTML = "XXX.3. var olE = document. body. onload;
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