I'm very used to using innerHTML, but it isn't a W3C DOM standard, so I'm trying to work my way out of using it and get to what I feel are better practices with the standard DOM. But I can't figure out how to clear the contents of an element. Here's my situation:
I have the output of a command between <pre> tags. It has the id of "cmd-output". How do I replicate this code using the standard DOM:
<a href="#" onclick="document.getElementById('cmd-output').innerHTML=''; return false;">clear output</a>
All the tutorials and articles I've found so far about ADDING nodes -- not clearing text from a node.