Different results selecting HTML elements with XPath in Firefox and Internet Explorer

后端 未结 10 801
-上瘾入骨i
-上瘾入骨i 2021-01-18 10:34

I\'m trying to select a specific HTML element in a document, for firefox i just use:

xpathobj = document.evaluate(xpath, document, null,
               XPath         


        
10条回答
  •  旧时难觅i
    2021-01-18 11:34

    The problem may be that in IE5+ [1] is in fact [2] in FF. Microsoft solely decided that the numbering should start at [0] and not [1] as specified by w3c.

提交回复
热议问题