aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/node/issamenode
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/node/issamenode
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/node/issamenode')
-rw-r--r--files/zh-cn/web/api/node/issamenode/index.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/node/issamenode/index.html b/files/zh-cn/web/api/node/issamenode/index.html
new file mode 100644
index 0000000000..ac0bf1fc21
--- /dev/null
+++ b/files/zh-cn/web/api/node/issamenode/index.html
@@ -0,0 +1,27 @@
+---
+title: Node.isSameNode
+slug: Web/API/Node/isSameNode
+translation_of: Web/API/Node/isSameNode
+---
+<p>{{ ApiRef() }}</p>
+<p>{{ Obsolete_header() }}</p>
+<h2 id="概述">概述</h2>
+<p>判断两个节点是否是相同的节点,即指向同一个对象.</p>
+<div class="warning">
+ <strong>警告:</strong>该方法已在DOM level 4中被废弃,最近的浏览器版本(Gecko 10.0 {{ geckoRelease("10.0") }}.)已经删除了这个方法.<br>
+ 也就是说,不要再使用<br>
+ <code>  node1.isSameNode(node2)</code><br>
+ 而使用<br>
+ <code>  node1 === node2  </code>或者<code>  node1 == node2</code><br>
+ 来代替.</div>
+<h2 id="语法">语法</h2>
+<pre class="eval">var <em>isSameNode</em> = <em>node</em>.isSameNode(<em>other</em>);
+</pre>
+<ul>
+ <li><code>other</code>是要和<code>node</code>判断相同性的另一个节点.</li>
+</ul>
+<h2 id="规范">规范</h2>
+<ul>
+ <li>{{ spec("http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isSameNode","DOM Level 3 Core: isSameNode","REC") }}</li>
+ <li>This has been removed from {{ spec("http://www.w3.org/TR/domcore/","DOM Core Level 4","WD") }}</li>
+</ul>