I\'m wondering if there\'s a way to change the text of anything in HTML without using innerHTML.
Reason I\'m asking is because it\'s kinda frowned upon by the W3C. I
You can get the same effect by manipulating the DOM. The safest way to change text is to remove all the child nodes of the element and replace them with a new text node.
var node = document.getElementById("one");
while( node.firstChild )
node.removeChild( node.firstChild );
node.appendChild( document.createTextNode("Two") );
Removing the child nodes gets rid of the text content of your element before replacing it with the new text.
The reason most developers avoid using innerHTML is that accessing elements through the DOM is standards compliant.