替換元素節點replaceChild()

替換元素節點replaceChild() replaceChild 實現子節點(對象)的替換。返回被替換對象的引用。  語法: node.replaceChild (newnode,oldnew ) 參數: newnode : 必需,用於替換 oldnew 的對象。  oldnew : 必需,被 newnode 替換的對象。 我們來看看下面的代碼:   效果: 將文檔中的 Java 改爲 Java
相關文章
相關標籤/搜索