tailieunhanh - Beginning Ajax with ASP.NET- P7

Beginning Ajax with P7:Thank you for purchasing Beginning Ajax with . We know that you have a lot of options when selecting a programming book and are glad that you have chosen ours. We’re sure you will be pleased with the relevant content and high quality you have come to expect from the Wrox Press line of books. | Chapter 3 Node Type Number Type Description Comments 9 Document Represents a reference to the root object in the document tree that is a reference to the entire document See previous detailed discussion in this chapter 10 Document Type A Document Type Definition For example the DOCTYPE element in an HTML document DOCTYPE html PUBLIC - W3C DTD XHTML Transitional EN http TR xhtmll DTD 11 Document Fragment Represents a lightweight Document object or a portion of a document 12 Notation Represents a notation declared in the DTD DTD Document Type Definition. An older form of defining an XML document structure Try It Out Using Node Properties As an example of utilizing these properties you can examine one of the paragraph p nodes from your previous example. You will add some further script code to the previous example as shown in the following code block var node paragraph var msg Node Name msg nNode Type msg nNode Value msg nNode Child Name msg nNode Child Type msg nNode Child Value alert msg This will produce the dialog box shown in Figure 3-6. 66 Figure 3-6 JavaScript and the Document Object Model You can see here that the paragraph node has a type of 1 and a name of P and its child node which represents the textual content of that paragraph node has a type of 3 and a name of text. The attributes property of a node is convenient way of referencing or examining the attributes that accompany a particular element or node. As mentioned in the table listing properties earlier in this chapter it is an array containing the attributes of the node. This array will contain a differing number of elements depending on which browser it is run within. To demonstrate this examine the web page and associated script code that follows DOCTYPE html PUBLIC - W3C DTD XHTML Transitional EN http TR xhtml1 DTD .

TỪ KHÓA LIÊN QUAN