function.domnode-replace-node.html
来自「php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容」· HTML 代码 · 共 57 行
HTML
57 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head> <title>Replaces node</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.domnode-replace-child.html">DomNode->replace_child</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.domnode-set-content.html">DomNode->set_content</a></div> <div class="up"><a href="ref.domxml.html">DOM XML Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="function.domnode-replace-node" class="refentry"> <div class="refnamediv"> <h1 class="refname">DomNode->replace_node</h1> <p class="verinfo">(No version information available, might be only in CVS)</p><p class="refpurpose"><span class="refname">DomNode->replace_node</span> — <span class="dc-title"> Replaces node </span></p> </div> <div class="refsect1 unknown"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type"><a href="class.domelement.html" class="type domelement">domelement</a></span> <span class="methodname"><b><b>DomNode->replace_node</b></b></span> ( <span class="methodparam"><span class="type"><a href="class.domelement.html" class="type domelement">domelement</a></span> <tt class="parameter">$newnode</tt></span> )</div> <p class="para rdfs-comment"> (PHP 4.2) This function replaces an existing node with the passed new node. Before the replacement <i><tt class="parameter">newnode</tt></i> is copied if it has a parent to make sure a node which is already in the document will not be inserted a second time. This behaviour enforces doing all modifications on the node before the replacement or to refetch the inserted node afterwards with functions like <a href="function.domnode-first-child.html" class="function">domnode_first_child()</a>, <a href="function.domnode-child-nodes.html" class="function">domnode_child_nodes()</a> etc.. </p> <p class="para"> (PHP 4.3) This function replaces an existing node with the passed new node. It is not copied anymore. If <i><tt class="parameter">newnode</tt></i> was already inserted in the document it is first unlinked from its existing context. If the replacement succeeds the old node is returned. </p> <p class="para"> See also <a href="function.domnode-append-child.html" class="function">domnode_append_child()</a> </p> </div></div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="function.domnode-replace-child.html">DomNode->replace_child</a></div> <div class="next" style="text-align: right; float: right;"><a href="function.domnode-set-content.html">DomNode->set_content</a></div> <div class="up"><a href="ref.domxml.html">DOM XML Functions</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?