You are here: irt.org | FAQ | JavaScript | Form | Q1701 [ previous next ]
Use its position within the elements array. For example, the following retrieves the value of the 2nd element:
<form> <input type="button" value="show value" onClick="alert(this.form.elements[1].value)"> <input type="text" value="Hello world"> </form>