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

Q388 How can I access a form field which has a non alpha name?

You are here: irt.org | FAQ | JavaScript | Form | 3.1 | Q388 [ previous next ]

In older browsers, the form fields are expected to have names that start with alpha characters if you use the following syntax:

document.formName.139.value = 'some text';

However, you can get around this if you use:

document.formName.elements['139'].value = 'some text';

©2018 Martin Webb