I have the following HTML:
<div id = "id1">
"some text 1"<br>
"more text 2" <br>
"name" <br>
<li> "list 1"</li>
"THEend"
<div class="class1" style="margin: 0px; padding: 0px;">
</div>
</div>
And the following JavaScript:
var contents = document.getElementsById("id1").innerHTML
Currently, the result of contents
includes the text from both id1
and class1
-- but I want to eliminate the contents of class1
entirely.
How should I proceed?
more text
name
list 1Theend – user3848973 Jul 17 '14 at 15:06