javascript - Netscape 7.0+ set HTML DOM node text (ECMAScript 3) -
i trying set inner text of element on netscape 7.0 have tried
var element = document.getelementbyid('element'); element.textcontent = 'working1'; element.innertext = 'working2';
this works in current browsers ie8+, ff, chrome, opera, microsoft edge, safari
history
from: https://www.w3.org/community/webed/wiki/a_short_history_of_javascript
the standards process continued in cycles, releases of ecmascript 2 in 1998 , ecmascript 3 in 1999, baseline modern day javascript. "js2" or "original es4" work led waldemar horwat (then of netscape, @ google) started in 2000 , @ first, microsoft seemed participate , implemented of proposals in jscript.net language.
according to: https://en.wikipedia.org/wiki/netscape_(web_browser)
netscape 7.0 released on august 29, 2002
according to: https://en.wikipedia.org/wiki/ecmascript
ecmascript 3 released on december 1999
.innertext
not supported in netscape. use .innerhtml
instead.
if need worry escaping, do:
element.appendchild(document.createtextnode("whatever"));
Comments
Post a Comment