Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

document.createExpression

该方法将编译生成一个 XPathExpression ,可以用来多次的执行.

语法

xpathExpr = document.createExpression(xpathText, namespaceURLMapper);

参数

  • String xpathText (将要编译的Xpath表达式)
  • Function namespaceURLMapper (将一个命名空间前缀映射到一个命名空间URL上 (如果不需要,可以为null))

返回值

XPathExpression

文档标签和贡献者

 此页面的贡献者: teoli, AshfaqHossain, ziyunfei
 最后编辑者: AshfaqHossain,