Where does the "item" object come from in javaScript
Messing with some javaScript, I found that the variable name "item" was already being assigned before I declared it or assigned anything to it. Tracing it backwards, I found that it even seemed defined before I did ANYTHING in js. To verify this, I even put
&开发者_StackOverflowlt;script>alert(item);</script>
on a line by itself IMMEDIATELY after opening the HEAD tag - upon loading the page, I get an alert box with the following:
"[object]"
If I do the same thing in FF, I get an error, saying that "item" is not defined.
Where is "item" coming from in IE?
Check this out >> "item" is a reserved keyword in IE
精彩评论