当前位置: 代码迷 >> JavaScript >> 如何对document做xpath查询
  详细解决方案

如何对document做xpath查询

热度:160   发布时间:2013-10-30 12:56:22.0
怎么对document做xpath查询?
document.selectNodes说undefined。。。  请问js里有没有提供像对xml那样根据xpath查询html节点的方法?

------解决方案--------------------
JS没有提供,浏览器或者说DOM提供了,不过不兼容。
IE提供的是selectNodes  selectSingleNode 。
  相关解决方案