-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
Put <input value=5 id="input"> in body and input a 10 in input field.
$("#input").attr("value") will return 10;
$("#input").attr("value", 20) will replace value=5 to value=20, but the input field will not change.
- I can't get the value attribute value.
- I can't set the input field value.
pure javascript:
document.getElementById("input").value will get(can set) input field value;
document.getElementById("input").g[s]etAttribute("value", 20) will get/set value attribute.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels