Only the HTMLElement in IE has the clearAttributesmergeAttributes method. They are non-standard ones. clearAttributes ()
This method is used to clear all user-defined attributes. As follows:
The Code is as follows:
Division
Script
Var p =
With jQuery being used by more and more people, jQuery-based form verification plug-ins are also popular with around 10 enumeration objects:
The Code is as follows:
// Tag types supported by various authentication methodsSustainType: function
This article mainly targets javascript modularization for simple parsing. How to Write a module and load the module on the page, interested friends can refer to this article to explain the modularization of javascript. The specific content is as
Sometimes it is necessary to imitate some of the user's actions (mouse and keyboard operations), the most common is the mouse click. List 1, dispatchEvent ()
This is a standard method for triggering events. You must create an event object before
In js, the character replacement function String. replace () is used frequently.
Definition and usage
The replace () method is used to replace other characters with some characters in a string, or replace a substring that matches a regular
Examples of adding numbers and strings in javascript are analyzed. For more information about js learning, see.
The Code is as follows:
Console. log ('---- 1 ----')Console. log ('12' + '34') // '123'Console. log ('12' + 34) // '123'Console. log (1
Convert the HTMLCollectionNodeList pseudo array to an array. For more information, see. Here, objects that meet the following conditions are called pseudo arrays.
1, with the length attribute
2. Data Storage by index
3. methods such as push and pop
An excellent JavaScript framework and an article on jQuery's common methods and functions are retained.
Common jQuery operations
$ ("Tag name") // obtain the html element document. getElementsByTagName ("")
$ ("# ID") // retrieve a single control
Many people may encounter a problem when using the JQuery. ajax method. When encoding is not a UTF-8, when the passed parameter contains Chinese, the server Request will appear garbled. I recently encountered the problem of passing Chinese
Jquery has a lot of trouble with the & lt; select & gt; operations. I collect the following Frequently Used operations: 1. obtain the selected value: $ ("# xmzt option: selected "). val () // xmzt is
Id 2. Set the selected item: $ ("select [@ id = '
The following describes the use of #, because multiple # numbers in the url indicate different meanings and differences. Generally, we want a tag a to click and execute javascript code, which can be written in the following ways:
Method 1: Click 1
The order in which a webpage is opened is based on the order from top to bottom of the page. To make the advertisement do not affect the page opening speed, you must wait until all the pages are opened and then load the JS Code. How to load the page
You can refer to the three puzzles about DOM elements and events to learn and use dom operations.
I. background knowledgeThere are several ways to add events to DOM elements:
1. Hard Encoding
2. event listening
3. Event binding provided by the JS
During this time, the project has been completed and the idle time is large. Started the ExtJs learning journey. After reading books for a few days, I checked the API. I can't remember much in my mind, so it's better to learn from it. Try to start
Recently, I started to learn ExtJs by myself. I downloaded some videos and searched some related articles and documents on the Internet to prepare for learning. The first time I came into contact with the ExtJs event mechanism this evening, I felt a
I wrote two articles about jQuery form verification the other day. The jQuery plug-in still has many problems, but I am still trying to update it. This article describes the range verification of input text in jQuery form verification. Before
Based on jQuery fade-in and fade-out, you can automatically switch the magic light plug-in. The prototype is a magic light effect written a few days ago, because a small bug is stuck for two days, and then the previously written code is cleared, I
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