How to remove div tag content?
This sould work document.getElementById("level3").innerHTML = '';
but try thinking about using jQuery, because .innerHTML
implementation differs in some browsers. jQuery would look like $('#level3').html('');
Why don't you access directly level3
?
document.getElementById("level3").innerHTML = "";
You can use:
document.getElementById("level3").innerHTML = "";