??
file Object Model ( Document Object Model . Referred to as DOM). is a Standard programming interface recommended by the Organization for the processing of extensible flag languages.
dom in other words, This is the representation and handling of a html xml regular usage of documents. Using the DOM allows us to pass in ajax html xml data for dom mode operation, so that the page dynamic change updates and data extraction processing.
Simple company of the DOM:
in the JAvaScript there is a special object in the Document that can represent the current HTML the root node of the page. the DOM treats each HTML or XML document as an object tree in memory.
。
in the DOM tree, the document content and very many different types of nodes, are a node object.
for DOM can be viewed using the DOM of the API .
Use:
using server-side return XML data, and then use the HttpRequest objects, and Response accept it as a DOM object to be processed, there are two other ways of getting XML the data.
in the JAvaScript Loading in XML There are two ways in which a document ① load the same domain XML documentation.
② loads a string representing XML .
can use Domapi for XML (in some ways XML is used to store data, allowing users to define their own tags in XML) the operation.
DOM serialization of objects becomes XML string.
is to say XML the file content of all parties as a string.
this is to put a XML The document is exported as a string.
The production of XPath technology:
because the use getElementById or Get Elementbytagname not very good to be sure XML the node
so the XPath technology. the dom4j Open source package in Java has selectsingnode and SelectNodes Such two methods can obtain one or more nodes according to an XPATH expression.
JAvaScript a commentary on the Advanced knowledge in
Array. Simple object creation,JSON data Format, object-oriented JAvaScript Classes define the definition of public properties and methods, and the definition of private properties and methods, the definition of static properties and methods, interface for simulating interfaces and classes.
These have been made with specific notes.
Use DOM mind to manipulate the document. You have to think like that in your head.
Dom Basics and DOM manipulation html