Closed egnima closed 8 months ago
A textarea's value attribute gives its current, user-provided contents, while innerHTML sometimes gives its default contents. value should always be used to get the latest contents. See the specs: https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-value
value
innerHTML
Great thank you. Merged!
A textarea's
value
attribute gives its current, user-provided contents, whileinnerHTML
sometimes gives its default contents.value
should always be used to get the latest contents. See the specs: https://html.spec.whatwg.org/multipage/form-elements.html#dom-textarea-value