XML DOM ownerDocument ÊôÐÔ
¶¨ÒåºÍÓ÷¨
ownerDocument ÊôÐÔ·µ»Ø½ÚµãËùÊôµÄ¸ùÔªËØ£¨Document ¶ÔÏ󣩡£
Óï·¨£º
attrObject.ownerDocument
ʵÀý
ÔÚËùÓеÄÀý×ÓÖУ¬ÎÒÃǽ«Ê¹Óà XML Îļþ books.xml£¬ÒÔ¼° JavaScript º¯Êý loadXMLDoc()¡£
ÏÂÃæµÄ´úÂëÆ¬¶Î·µ»Ø XML ÎĵµÖеÚÒ»¸ö category ÊôÐÔ½ÚµãµÄ¸ùÔªËØ£º
xmlDoc=loadXMLDoc("/example/xdom/books.xml");
x=xmlDoc.getElementsByTagName('book');
document.write(x.item(0).attributes[0].ownerDocument);
document.write("<br />");
document.write(x.item(0).attributes[0].ownerDocument.nodeName);
document.write("<br />");
document.write(x.item(0).attributes[0].ownerDocument.nodeType);
ÒÔÉÏ´úÂëµÄÊä³ö£º
[object XMLDocument] #document 9