With the HTML Dom, JavaScript can access all the elements of an HTML document.
The HTML dom (Document Object Model)
When a Web page is loaded, the browser createsDOcumentOBjectMOdel of the page.
TheHTML domModel is constructed as a
PrefaceLearning is interesting, but it is better to filter the learning content. This blogger provides and shares his learning experience with friends who are new to javascript client programming! I suggest you look at :( Uncle Tom's blog)
1. Dom is the short name of the Document Object model.When a Web page loads, you can convert the structured document into an object tree in memory.Simply put, Dom is not a technology, but a way of accessing structured documents. With the DOM model,
DNS resolution
Establish a TCP connection
Send HTTP request
The server accepts the request and returns information
Browser processing return information
Render page
Break link
DOM parsing process:
Parses the HTML structure.
1. How to get the objectMethod Onedocument.getElementsByTagName ("div");document.getElementById ("Head");Document.getelementsbyname ("username");Method two//via arraydocument.all//exists for IE, does not exist for
Learning is interesting, but it is better to filter the learning content. This blogger provides and shares his learning experience with friends who are new to javascript client programming! I suggest you look at :( Uncle Tom's blog)
Http://www.cnblogs.com/TomXu/archive/2012/02/16/2351331.html, come back to read this article, you will have a deeper understanding. This is because I have introduced few concepts here. Looking at the example below, it may be difficult for beginners!1
The getElementByName () method of the html DOM document Object, domdocument
The getElementsByName () method returns a set of objects with the specified name.
Syntax:
Document. getElementsByName (name)
This method is similar to the getElementById
Http://www.cnblogs.com/TomXu/archive/2012/02/16/2351331.html, come back to read this article, you will have a deeper understanding. This is because I have introduced few concepts here. Looking at the example below, it may be difficult for beginners!
I. Documentation (D)A Web page runs in a browser, and he is a document object.Ii. Objects (O)An "Object" is a self-contained collection of data. A variable associated with a particular object is called a property of this object, and a function
JavaScript and XML (a) browser support for XML DOMThe DOM2 level is the first specification that mentions the dynamic creation of XML DOM concepts. The DOM3 level further enhances the XML DOM.1.dom2 level CoreDocument.implementation.createDocument
Web Front-end Tutorial: CSS layout is here, webcss
CSS layout
Layout is an important part of CSS. This article summarizes common techniques in CSS layout, including common horizontal center and vertical center methods, as well as multiple
From http://blog.csdn.net/wishfly
Magic dom
"
Dom Level 2
One of the modules described in is
Events
Module, which specifies a method for processing
Dom
Events in the document.
In earlier versions of browsers, the built-in event
Now the mainstream JS framework to Count ExtJS and jquery application is more extensive. jquery is lightweight, generally do Web site application is more common, visible size small advantage. ExtJS is large, it provides a powerful set of UI
The question that was puzzled in the previous article will be taken care of in this chapter and later chapters.Starting today, Learning DOM programming lets us slowly call it a beginner JS programmer.Then to the JS Craftsman direction development.
pages loaded by the D:document document browser
DOM O:object object pages and any elements in the page are objects
Organization of elements in the M:module model page
Dom is designed by the consortium as a platform-independent,
This example describes the Document object Forms collection usage in the HTML DOM. Share to everyone for your reference. The specific analysis is as follows:
The Forms collection returns a reference to all Form objects in the document.
Grammar:
This document introduces how to use JavaScript DOM to modify document tree and how to use JavaScript DOM to create and clone elements, let's start with the most basic elements of the HTML page:
DOM Examlie
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.