1 year ago

#293253

test-img

d.c

innerText returns value of "value" attribute in Internet Explorer but not in Chrome

When I set value of an element via script

textAreaObject.value = "some text"

and try to get text of this object via textObject.innerText Internet Explorer 11 returns "some text" but chrome does not.

According to this link https://caniuse.com/innertext there is a known issue of IE 11 incorrectly returning value of placeholder attribute via innerText, but I could not find anything about same happening for value attribute. Is this a bug in IE11?

Example chrome:

enter image description here

Example IE:(same html file)

enter image description here

javascript

google-chrome

internet-explorer

internet-explorer-11

innertext

0 Answers

Your Answer

Accepted video resources