diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/document/createexpression/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/document/createexpression/index.html')
-rw-r--r-- | files/zh-cn/web/api/document/createexpression/index.html | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/createexpression/index.html b/files/zh-cn/web/api/document/createexpression/index.html new file mode 100644 index 0000000000..50636d1874 --- /dev/null +++ b/files/zh-cn/web/api/document/createexpression/index.html @@ -0,0 +1,19 @@ +--- +title: document.createExpression +slug: Web/API/Document/createExpression +translation_of: Web/API/Document/createExpression +--- +<p>{{ ApiRef() }}</p> +<p>该方法将编译生成一个 <code><a href="/zh-cn/XPathExpression" title="zh-cn/XPathExpression">XPathExpression</a></code> ,可以用来多次的执行.</p> +<h3 id="Syntax" name="Syntax">语法</h3> +<pre class="eval"><em>xpathExpr</em> = <em>document</em>.createExpression(<em>xpathText</em>, <em>namespaceURLMapper</em>); +</pre> +<h3 id="Arguments" name="Arguments">参数</h3> +<ul> + <li>String <code>xpathText</code> (将要编译的Xpath表达式)</li> + <li>Function <code>namespaceURLMapper</code> (将一个命名空间前缀映射到一个命名空间URL上 (如果不需要,可以为<code>null</code>))</li> +</ul> +<p>{{ Fx_minversion_note("3") }}</p> +<h3 id="Return" name="Return">返回值</h3> +<p><a href="/zh-cn/XPathExpression" title="zh-cn/XPathExpression">XPathExpression</a></p> +<p>{{ languages( {"en": "en/DOM/document.createExpression" } ) }}</p> |