JS in a lot of DOM methods are for the array, but sometimes we will get some pseudo-array, at this time to manipulate the pseudo-array, then we must transform the pseudo-array into arrays, the following through the method of apply () demo An example,
JavaScript Form ValidationHTML form validation can be done through JavaScript.Automatic validation of HTML formsHTML form validation can also be done automatically through a browser. Nternet Explorer 9 and earlier IE browsers do not support forms
This paper mainly introduces JS performance optimization related knowledge.Scope-Related:1. Avoid global lookupsWe know that the scope chain is local in front, global in the back, then the access to global variables need to traverse the scope chain,
Jquery (i)--style chapter1.$ (document). The role of ready is to wait until the nodes in the document of the page are loaded and then execute the subsequent code.Because we may rely on an element of the page when we execute the code, we want to make
See a joke on Weibo
"I will be the CEO to marry mating to embark on the pinnacle of life, must hire two long legged Big Bear's sister." A help me to think of the variable name, a help me want git commit message! ”
It can be seen that
In jquery, selecting an element on a page returns a collection of jquery objects instead of the original DOM object. So you can only run the jquery method. If you want to run DOM methods and properties on a selection set, the collection must be
1. Maintainability:
Understandable: Understanding intentions and general approaches
Intuitive:
Adaptable to
Extensibility
Debugger-Selectable
2. Code Conventions:1. Readability: Indents and annotations. Comments are
The sixth chapter case study: Picture Library improvement EditionThis chapter will improve the image library according to the content mentioned in chapter fifth.First check whether the DOM method is supported by the browserif
Traditional technologies: Document.Write and InnerHTMLDeep anatomy of DOM Methods: Write () for createelement, createTextNode, AppendChild, and InsertBefore 7.1.1 document.writedocument objects method to easily and quickly insert a string into a
1. References to page elementsThe $ () reference element through jquery includes methods such as the ID, class, element name, and the hierarchy of elements and Dom or XPath conditions, and the returned object is a JQuery object (collection Object)
unobtrusive JavaScript is a design concept that removes JavaScript from the HTML structure, avoiding the inclusion of a bunch of onchange, onclick in HTML tags ... And so on, to Mount JavaScript events, to separate HTML from JavaScript, and to
Ajax, cross-domain, JSONPReference: JavaScript Advanced Programming Chapter 21st: AJAX operations in Ajax and Comet jquery
Usage and differences for apply and call:
Usage:Can inherit the methods and properties of another object, except
Ajax, cross-domain, JSONP
Reference: JavaScript Advanced Programming Chapter 21st: AJAX operations in Ajax and Comet jquery
Usage and differences for apply and call:
Usage:Can inherit the methods and properties of another object,
DomDOM: Document Object model;NodeElement node: The atom of the DOM is the element node. Elements such as , , . An element can contain other elements. The only element that is not contained in other elements is the elementText nodes: In an XHTML
1th Chapter JavaScript History 1.1 JavaScript originsJavaScript was developed by Netscape company in collaboration with Sun Corporation.JavaScript is an implementation of the ECMAScript standard, but in a general expression, the two refer to the
This version is an important upgrade, consider to introduce a lot of things, there are many things useful to everyone, also sent to the home page.Originally there is no 1.36, based on the static collection relies on the 1.4 design, found that
Dom ExtensionThe two major extensions to the DOM are the selectors API (Selector API) and HTML5.(i) Selector APIThe core of selectors API level 1 is two methods:Queryselector () and Queryselectorall () .In a compatible browser, they can be called
The DOM2 level is just based on the DOM1 level by adding new methods and new attributes to enhance the existing type, node type change: LocalName (name without namespace prefix), NamespaceURI (namespace URI or null), prefix ( namespace prefix)The
What is the following two code to see on jquery's website, when to use $ (this), and when to use this?$ (document). Ready (function () { $ ("#orderedlist li:last"). Hover (function () { $ (this). AddClass ("green"); , function () { $
0. PrefaceJQuery's selectors are often used in the course of learning and using JavaScript, but it is often difficult to find a DOM object or a jquery object when it is often "confusing" to get a selection result. In order to let oneself no
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.