index is an integer representing a radio button in a radio object or an option in a select object.
property of
描述
the value property differs for every object.
hidden, text, and textarea objects
the value property is a string that initially reflects the value attribute. this string is displayed in the text and textarea fields. the value of this property changes when a user or a program modifies the field.you can set the value property at any time. the display of the text and textarea objects updates immediately when you set the value property.
password object
the value property is a string that initially reflects the value attribute. this string is represented by asterisks in the password object field. the value of this property changes when a user or a program modifies the field, but the value is always displayed as asterisks.
if you programatically set the value property and then evaluate it, javascript returns the current value. if a user interactively modifies the value in the password field, you cannot evaluate it accurately for security reasons.
button, reset, and submit objects
when a value attribute is specified in htm, the value property is a string that reflects it. this string is displayed on the face of the button.
when a value attribute is not specified in htm, the value property differs for each object: