Đang chuẩn bị liên kết để tải về tài liệu:
Beginning Ajax with ASP.NET- P7

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Beginning Ajax with ASP.NET- P7:Thank you for purchasing Beginning Ajax with ASP.NET. 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 1.0 Transitional EN http www.w3.org TR xhtmll DTD xhtmll-transitional.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 node.nodeName msg nNode Type node.nodeType msg nNode Value node.nodeValue msg nNode Child Name node.firstChild.nodeName msg nNode Child Type node.firstChild.nodeType msg nNode Child Value node.firstChild.nodeValue 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 1.0 Transitional EN http www.w3.org TR xhtml1 DTD .