Ask a Question
Advertise on boostr.in
Organizational Research By
Surprising Reserch Topic
is there a spec that the id of elements should be made global variable
However this does not work with FireFox - I will need to use document.getElementById('a').
What is the correct behaviour here? (according to W3 specs that is)
Also I'm interested in how will Chrome resolve the ambiguity if I have a div with id a yet have a global variable called a too in my script. Is the behavior going to be random and whacky?
And how would an element with id consisting of hyphens ("-"), colons (":"), and periods (".") be translated (ok i know they can be accessed with document.getElementById but how will the browser translate it into the global variable that was representing them)
Sep 9, 2015
to add a comment.
Related Hot Questions
Government Jobs Opening