Possible Duplicate:
IE/Chrome: are DOM tree elements global variables here?
Description:
Hi there I just noticed that when I use an id on a form it's available as a global variable after this. I tested this on Firefox 17.0 and Google Chrome 23.0 both on a Mac. I was kinda surprised when I saw this!
HTML-Code:
<form class="input-form" id="test">
<label for="key">Key</label>
<input type="text" name="key">
</form>
Question:
Does this mean it's actually a very bad idea to use id's on a from or am I completely wrong?
Thanks in advance.