He supports the following DOM2 methods:
AppendChild, CloneNode, HasAttributes, HasChildNodes, InsertBefore, normalize, RemoveChild, ReplaceChild.
The following DOM2 are also supported:
Attributes, ChildNodes, FirstChild, LastChild, LocalName,
JavaScript objects inherit properties from a prototype object (prototype objects). All objects have prototypes; All the properties of the prototype look like the properties of those objects that use it as a prototype. To put it simply:
All objects
It is because JS is a dynamic language, so the address of JS is in-situ addressing, rather than as C, compiled after the confirmation. In addition, JS introduced the this pointer, which is a very troublesome thing, because it "implicitly" as a
In Mozilla:How to use AddEventListener:
Target.addeventlistener (type, listener, usecapture);
Target: Documentation node, document, window, or XMLHttpRequest.
Type: String, event name, excluding "on", such as "click", "MouseOver", "KeyDown", and
Nested
The single quote ' ASCII code is 39 double quotes ' ASCII is 34, so we can use the form of & #xxx to replace the specific symbol. Although it becomes a & #xxx, it is still very careful in nested environments. The quotes in the code here
Old in front of the eyes, so on the Internet search it, check the information, very depressed online introduction of the colon usage of the post is not much, and relatively fragmented, and not deep enough to read people more confused, toss for two
[Escape]
The ISO Latin character set encodes the specified string and does not encode characters [@ */+]
[encodeURI]
The UTF-8 character set encodes the specified string
[encodeURIComponent]
The UTF-8 character set encodes the specified string,
You know that there is a serialize method in jquery that you can serialize a form to a "&" concatenated string without providing a way to serialize to JSON. However, we can write a plugin implementation. I saw someone use the replacement method
The Encapsulates the DOM 0-level event handler and the DOM2-level event handler (ie event handler) as a Eventutil object for Cross-browser effects. The code is as follows:
var eventutil = {//Add event handle Addeventhandler:function
Method One:
The browser internal converter implements the transformation by dynamically creating a container tag element, such as a Div, which is set to convert the string to the innertext (ie support) | | Textcontent (Firefox support), and then
The properties of an object in ES5 can be divided into ' data properties ' and ' accessor properties '.
Data properties are typically used to store data values, and accessor properties correspond to set/get operations and cannot store the data
What is a cross-domain request? The simple understanding of is to make a request to a server file that is not in the same domain name. This is still a practical example to explain it, such as baidu.com to cxyblog.com send a request, the two
The effect is as follows: When you click on the question, display the following reply content.
Copy Code code as follows:
Script type= "Text/javascript" >
onload = function () {
FAQ (document.getElementsByTagName ("DL") [0], "DT",
Identifying text Signatures
Let's take a look at the overload use cases mentioned in the previous article:
Copy Code code as follows:
var extend = overload
. Add ("*, ...",
function (target) {})
. Add ("Boolean, *, ...",
In many cases, we need to change these default actions, such as: When we click on a link, we perform some AJAX operations, but we do not want to perform a jump action, so we have this article: block browser default action.
In fact, this is not a
Speaking of the branching structure in JavaScript, we have to mention the word Process control, all of our programs are made up of data and algorithms.
program = data + algorithm
Usually, the algorithm can be composed of "order", "branch", "loop"
Javascript two form pass value implementation code
There's also a function in JavaScript window.showmodaldialog can also open a new form, but he opens a modal window, so how do you pass values between the parent form and the subform? Let's look at
Before learning the variable scope of JavaScript, we should be clear on a few points:
A, JavaScript's variable scope is based on its specific scope chain.
b, JavaScript does not have block-level scopes.
C, variables declared in a function are
To this end, collected their usual use of some JavaScript functions, they are also common in other JS library, now collated and attached notes, convenient access, hope to help everyone.
Note: Suppose that all of the following functions are placed in
The scope is one of the most important concepts of JavaScript, and to learn JavaScript well you need to understand how JavaScript scopes and scope chains work. Today's article on the JavaScript scope sample detailed introduction, I hope to help you
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