aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSCWR <dl_run@qq.com>2021-06-29 14:49:30 +0800
committerIrvin <irvinfly@gmail.com>2021-07-02 14:51:35 +0800
commit04449b4dcacaa0d936989b572b6b43ed37e2d1bb (patch)
treed9d49e3799e99e069006039a86c6830cb5e2df5f
parent38dba1560ad332820179aa8a567b5f13334ca074 (diff)
downloadtranslated-content-04449b4dcacaa0d936989b572b6b43ed37e2d1bb.tar.gz
translated-content-04449b4dcacaa0d936989b572b6b43ed37e2d1bb.tar.bz2
translated-content-04449b4dcacaa0d936989b572b6b43ed37e2d1bb.zip
Update index.html
translation
-rw-r--r--files/zh-cn/web/xpath/introduction_to_using_xpath_in_javascript/index.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/files/zh-cn/web/xpath/introduction_to_using_xpath_in_javascript/index.html b/files/zh-cn/web/xpath/introduction_to_using_xpath_in_javascript/index.html
index d72b2fdfe7..8821b1dcb4 100644
--- a/files/zh-cn/web/xpath/introduction_to_using_xpath_in_javascript/index.html
+++ b/files/zh-cn/web/xpath/introduction_to_using_xpath_in_javascript/index.html
@@ -66,7 +66,7 @@ original_slug: Web/JavaScript/Introduction_to_using_XPath_in_JavaScript
<pre class="brush: js">var nsResolver = document.createNSResolver( contextNode.ownerDocument == null ? contextNode.documentElement : contextNode.ownerDocument.documentElement );
</pre>
-<p><span class="comment">Or alternatively by using the &lt;code&gt;createNSResolver&lt;/code&gt; method of a &lt;code&gt;XPathEvaluator&lt;/code&gt; object. &lt;pre&gt; var xpEvaluator = new XPathEvaluator(); var nsResolver = xpEvaluator.createNSResolver( contextNode.ownerDocument == null ? contextNode.documentElement : contextNode.ownerDocument.documentElement ); &lt;/pre&gt;</span></p>
+<p><span class="comment">或者,也可以使用 <code>XPathEvaluator</code> 对象的 <code>createNSResolver</code> 方法。<pre> var xpEvaluator = new XPathEvaluator(); var nsResolver = xpEvaluator.createNSResolver( contextNode.ownerDocument == null ? contextNode.documentElement : contextNode.ownerDocument.documentElement ); </pre></span></p>
<p>然后传递 <code>document.evaluate</code>,将 <code>nsResolver</code> 变量作为 <code>namespaceResolver</code> 参数。</p>