I am trying to remove the text, “Hi Mom” from an html page using javascript after it loads.
I can not use any framework like jQuery.
I can use the DOM, but will not know where it is, other than it’s wrapped in a tag somewhere.
Can this be done in plain old Javascript?
Here’s a pretty simple DOM walk you can do.
There could be improvements if you thought there may be more than once occurrence in the same text node, but it doesn’t sound like that’s the case.
DEMO: http://jsfiddle.net/UrNWb/