How can I make a form label activate (focus) the form field it coincides with?
+2
A:
use the for
attribute on the label. It references the id
attribute of the form input/field you want it to focus.
eg. <input type="text" id="txt1" /><label for="txt1">Text 1</label>
Alastair Pitts
2010-10-08 02:54:29