Core code:Copy codeThe Code is as follows:DEMO code: title change effect code: Home of the script www.jb51.net Home of the script test, title change effect code. [Ctrl + A select all Note: If you need to introduce external Js, You need to
JQuery's use began to become the primary choice for javascript developers. However, without an overall plan, simple adoption will inevitably increase the maintenance cost in the future. A large number of jQuery plug-ins are like a double-edged sword,
From jQuery 1.4.1 Chinese reference:
Event Delegate
. The live () method is effective for an element that has not been added to the DOM because event delegation is used: event Handlers bound to the ancestor element can respond to events triggered
Below is the dom structure of the pageCopy codeThe Code is as follows: One Two Three Four Below is the javascript codeCopy codeThe Code is as follows:// Obtain the object by IDFunction id (v) {return document. getElementById (v );}// Obtain
1. Embrace JavaScriptOnce well-known JavaScript has doubled its value with the popularity of AJAX. Now JavaScript is no longer just a dispensable auxiliary tool in WEB development, but it even has its own position as a "JavaScript engineer ", even
1. prototype: (1). Using prototype can greatly reduce the memory demand for each object, because the object can inherit many attributes.(2). Objects can inherit these attributes even if they are added to the prototype after the object is
Cross-origin operations of Ajax have always been a problem. Currently, the main solutions include:1. JSONP (must be supported on the server)2. IFrame (operations can only be performed between subdomains)3. Page proxy (this is omnipotent)4.
If anyone is interested, they can change it to dynamic loading data, or use jquery, and the code will certainly be much less! I found that adding some css makes this tree useful on static pages! the definition list can also be changed to a tree:
Copy codeThe Code is as follows:Function tt (){Alert (11 );}Var B = tt;Var b1 = tt (); // execute the tt () function For function reference, you can directly assign the function name "tt" to the variable, but it cannot be in the form of function
Of course, the Code is also very convenient to use, so you don't have to worry about a lot of things.In the study, jQuery is used to drag a div, and the code is appended to the end of this article.For implementation ideas, refer to my DIV (2) that
1. Disable right-click and copyMethod 1:Add the following code to the webpage:Method 2: Add the following code to :OrIn essence, method 2 is the same as method 1.Method 3: If you only restrict replication, you can add the following code in :2.
Read xml files to strings Step 1: convert an xml file into a DOM Structure1Var xmlDoc = document. implementation. createDocument ("", "test", null );XmlDoc. load ("d: \ develop \ bookmarks. xml ");2Var req = new XMLHttpRequest ();Req. open ("GET",
We can use onload to determine the loaded JS object (js. onload), this method is supported by Firefox2, Firefox3, Safari3.1 +, and Opera9.6 + browsers, but not IE6 or IE7. Curve saving-IE6 and IE7 we can use js. onreadystatechange is used to track
Two major changes are made:I. synchronization between upstream and downstream selections and input values.After you enter a keyword, the value of the keyword input box is not synchronized with the selected value when the drop-down option is
First, let's talk about the style sheet attributes.1. inline style is set in the element style attribute, with the highest level2. The page style table definition is defined in the page , followed by the level3. External link style table
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