欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
XML DOM Clone Nodes

XML DOM Clone Nodes


Examples

In the examples below, we will use the XML file books.xml, and the JavaScript function loadXMLDoc().

Copy a node and add it to the node list
This example uses cloneNode() to copy a node and append it to a node list.


Copy a Node

The cloneNode() method creates a copy of a specified node.

The cloneNode() method has a parameter (true or false). This parameter indicates if the cloned node should include all attributes and child nodes of the original node.

The following code fragment copies the first <book> node and then adds the copy to the end of the node list:

xmlDoc=loadXMLDoc("books.xml");
var oldNode=xmlDoc.getElementsByTagName(‘book‘)[0];            var newNode=oldNode.cloneNode(true);            xmlDoc.documentElement.appendChild(newNode);            //Output all titles            var y=xmlDoc.getElementsByTagName("title");            for (i=0;i<y.length;i++)            {            document.write(y[i].childNodes[0].nodeValue);            document.write("<br />");            }

Output:

Everyday Italian            Harry Potter            XQuery Kick Start            Learning XML            Everyday Italian



本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
XML DOM介紹
Javascript 操作XML
[轉載]JS創(chuàng )建XML
PHP 生成xml簡(jiǎn)單實(shí)例代碼
string 轉化xml xml轉化為string
使用javascript+dom+xml實(shí)現分頁(yè)
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久