Home > Web Front-end > JS Tutorial > body text

jQuery DOM operation summary and examples_jquery

WBOY
Release: 2016-05-16 18:37:17
Original
737 people have browsed it

Classification of DOM operations: DOM CORE (core), HTML-DOM and CSS-DOM
1. DOM Core
DOM Core is not exclusive to javascript, any programming that supports DOM Any language can use it.

Its use is not limited to processing web pages, but can also be used to process any document written in a markup language, such as XML.

getElementById(), getElementByTagName() in Javascript , getAttribute() and setAttribute() methods are both components of dom core.

2. HTML_DOM

Using HTML_DOM to get the form object
Document.forms
Using HTML_DOM to get the src attribute of an element
Element.src
3. CSS_DOM

CSS_DOM is an operation for CSS. In JavaScript, the main function of CSS-DOM technology is to obtain and set various attributes of the style object. By changing various attributes of the style object, the web page can present various effects.
Element.style.color = “red”;
As a javascript library, jQuery inherits and develops the characteristics of javascript for operating DOM objects, allowing developers to conveniently operate DOM objects.

jQuery’s DOM operation methods include creating, copying, reorganizing, and modifying elements. The following example is fully usable, each line is commented, please copy the code and run it.

Copy code The code is as follows:











Jiayue Terry.Feng.C class="footnote">Feng Ruitao


1. jQueryDynamicly add attributes to links.



2. CSLA.NetThe strongest framework at the business layer. CSLA CommentsOmit part



3. DNNFree and open source CMS system. DNN commentOmit part







Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!