Navigator 2.0, buggy in Internet Explorer 3.0
element.value
value is a read/write string property of all form elements. It specifies the value that is displayed by the form element and/or submitted for the element when the form is submitted. The value property of the Text element, for example, is the user's input, which is also the value submitted with the form. For the Checkbox object, on the other hand, the value property specifies a string that is not displayed, but which will be submitted with the form if the Checkbox element is checked when the form is submitted.
The initial value of the value property is specified by the VALUE attribute of the HTML tag that defines the form element.
For Button, Submit, and Reset objects, the value property specifies the text to appear within the button. On some platforms, changing the value property of these elements will actually change the text displayed by the buttons on-screen. This does not work on all platforms, however, and is not an advisable technique because changing the label of a button may change the size of the button, and cause it to overlap and obscure other portions of the document.
The Select element has a value property, like all form elements, but does not use it. Instead, the value submitted by this element is specified by the value property of the Option objects it contains.
In Navigator 2.0 and Internet Explorer 3.0, the value property of the Password object is nonfunctional for security purposes. It can be read and written, but this has no bearing on the value entered by the user, or submitted with the form. In Navigator 3.0, when the data-tainting security model is enabled, the value property does actually contain the user's input to this element.
A limitation of Internet Explorer 3.0 only allows strings to be assigned to the value property of HTML form elements. If you want to assign objects to this property, you must explicitly convert them to strings by, for example, adding the empty string to them. Thus, to display the current date and time in a text field, Internet Explorer would require code like this:
var today =index.html new Date(); document.forms[0].elements[1].value = "" + today;
Internet Explorer 3.0 does not automatically convert objects to strings when they are assigned to this property; you must explicitly perform that conversion yourself.
file: /Techref/language/JAVA/SCRIPT/definitive/refp_115.htm, 6KB, , updated: 2019/10/14 15:00, local time: 2024/11/14 09:15,
18.224.62.238:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://massmind.ecomorder.com/techref/language/JAVA/SCRIPT/definitive/refp_115.htm"> [Chapter 21] Reference: Element.value</A> |
Did you find what you needed? |
Welcome to ecomorder.com! |
Welcome to massmind.ecomorder.com! |
.