Closed
Bug 76194
Opened 25 years ago
Closed 25 years ago
The attribute 'value' doesn't get updated when modifying text in antext input
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
VERIFIED
INVALID
People
(Reporter: thomas, Assigned: joki)
References
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Macintosh; U; PPC; en-US; 0.8.1)
BuildID: 20010326
I have a <input type="text" value="a" id="field" />
If the users changes the value in the field to "b" a
document.getElementById('field').getAttribute('value') returns 'a'.
Reproduced on Mac Fizzilla 3/26 and Linux Mozilla 0.8.1
Reproducible: Always
Steps to Reproduce:
Put a <input type="text" value="a" id="field" /> in a page.
Set in the browser the content of the field to 'b'
Check document.getElementById('field').getAttribute('value')
Actual Results: document.getElementById('field').getAttribute('value') returns 'a'
Expected Results: It should return 'b'
Comment 1•25 years ago
|
||
This is correct behavior. getAttribute('value') returns whatever was in the
original HTML as the VALUE attribute. This is the DOM .defaultValue property and
_does_not_change_ when the text in the element is changed (it's what used to
"reset" form elements). If you want to get the new text, use
document.getElementById('field').value
resolving invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•