javascript xpath的问题
ie下
比如
a.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN " "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<html xmlns= "http://www.w3.org/1999/xhtml " xml:lang= "utf-8 " lang= "utf-8 ">
<body>
<div class= "l1 ">
<div class= "l2 ">
</div>
</div>
<div class= "l1 ">
<div class= "l2 ">
</div>
</div>
<script type= "text/javascript " src= "xpath.js "> </script>
</body>
</html>
ie环境下xpath.js里怎么写可以通者xpath选择
a.html里的元素?
------解决方案-------------------- <XML id= "aXML " src= "a.html> </XML>
in javascript
aXML.selectSingleNode( "you xpath ");