开发者

Reserved word 'script' embedded in id tag - id can't be referenced

开发者 https://www.devze.com 2023-01-01 20:56 出处:网络
This is a new one on me. In FF 3.6.3, use of the word \'script\' in a tag id seems to make the id return null when searched on with document.getElementById.

This is a new one on me.

In FF 3.6.3, use of the word 'script' in a tag id seems to make the id return null when searched on with document.getElementById.

Thus document.getElementById("blah_script") returns null from <div id="blah_script">开发者_高级运维;</div>.

Understood that 'script' in general is a reserved word, but I didn't know it was so spooky that a mass-adopted browser would care if it was in a tag id with a preceding expression for disambiguation.

0

精彩评论

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