Implement innertText in Mozilla
Posted by
hungle
There is a innerText property in IE4 and upper version, but there is no such a property in Mozilla base browser, in order to simulate this property , using this code to overide default behavior for Mozilla base browser:
HTMLElement.prototype.__defineSetter__("innerText", function (sText) {
this.innerHTML = sText.replace(/\&/g, "&").replace(//g, ">");
});
blog comments powered by Disqus
Subscribe to:
Post Comments (Atom)