XML DOM ownerDocument ÊôÐÔ

Node ¶ÔÏó²Î¿¼ÊÖ²á

¶¨ÒåºÍÓ÷¨

ownerDocument ¿É·µ»ØÄ³ÔªËصĸùÔªËØ¡£

Óï·¨£º

nodeObject.ownerDocument

ʵÀý

ÔÚËùÓеÄÀý×ÓÖУ¬ÎÒÃǽ«Ê¹Óà XML Îļþ books.xml£¬ÒÔ¼° JavaScript º¯Êý loadXMLDoc()¡£

ÏÂÃæµÄ´úÂëÆ¬¶Î¿ÉXMLÎĵµÖÐÊ׸ö <title> ½ÚµãµÄ¸ùÔªËØ£º

xmlDoc=loadXMLDoc("books.xml");

var x=xmlDoc.getElementsByTagName("title")[0].ownerDocument;

document.write("Nodename: " + x.nodeName);
document.write(" (nodetype: " + x.nodeType + ")");

Êä³ö£º

Nodename: #document (nodetype: 9)

Node ¶ÔÏó²Î¿¼ÊÖ²á

VUE