开发者

Link to activate form field

How can I make a form label act开发者_JAVA百科ivate (focus) the form field it coincides with?


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>

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜