Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q601 How do I set focus to a text box when a checkbox is checked?

You are here: irt.org | FAQ | JavaScript | Form | 2 | Q601 [ previous next ]

Try:

<form>

<input type="checkbox" onClick="if (this.checked) this.form.myText.focus()">

<input type="text" name="myText">

</form>

Feedback on 'Q601 How do I set focus to a text box when a checkbox is checked?'

©2018 Martin Webb