Assertion:
Internet Explorer and Netscape do not use the VALUE attribute
as the default contents of the input area. Any default value set via HTML is not
usable via scripting and the DOM as well (hence it is not listed as 'supported'
in any of the browsers.) If a user enters text in the field however, that value
is then reachable via the DOM as it normally would be for a normal INPUT field
(via the .value property.) The reason for this behavior would presumably be to
ensure the security/safety of users against malicious authors. Opera displays
the default VALUE attribute value and submits it as well (although it prompts for
confirmation on submit if you have not altered that value.)
Plain Input Type=File field, no VALUE attribute. Click the "get DOM .value"
button to see the value attribute both before and after entering text or choosing a
file in the INPUT FILE widget:
filler text
filler text
Plain Input Type=File field, VALUE attribute present ("loadedValue"). Click the "get DOM .value"
button to see the value attribute both before and after entering text or choosing a
file in the INPUT FILE widget:
filler text
filler text