|
Q111 How when I click on the textBox do I set the focus to the checkBox?
irt.org | Knowledge Base | JavaScript | Form 2 | Q111 [ previous next ]
Q111 How when I click on the textBox do I set the focus to the checkBox?
Try this:
<FORM NAME="formName">
<INPUT TYPE="TEXT" onFocus="blur();document.formName.tick.checked=true">
<INPUT TYPE="CHECKBOX" NAME="tick">
</FORM>
|
Or this:
<FORM NAME="formName2">
<INPUT TYPE="TEXT" onFocus="blur();document.formName2.tick.focus()">
<INPUT TYPE="CHECKBOX" NAME="tick">
</FORM>
|
|
|
Copyright © 1996-2009 irt.org, All Rights Reserved.