开发者

getElementsByTagName gives us the same result for IE and Firefox

开发者 https://www.devze.com 2023-01-06 19:01 出处:网络
We are using the getElementsByTagName function to find out domnodes present in the article. We found that IE and Firefox give different result for broken tag as below.

We are using the getElementsByTagName function to find out domnodes present in the article.

We found that IE and Firefox give different result for broken tag as below.

e.g. <a href="http://www.yahoo.com">Bypass HTML tags</ a> &nbsp; Complete 2 Fails

In IE : for above example we will get two nodes 'A' and '/'.

In firefox for a开发者_运维百科bove example we will get one node 'A'.

Both browsers should give same Dom elements.

Thanks in advance


</ a> is not valid (X)HTML. You want </a>

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号