js动态移除DIV

<span style="font-size:24px;">function IsShow() {


    var container = document.getElementById("aa0");

    if (container.childNodes.length > 0) {
        var childNodes = container.childNodes;
        while (childNodes[0].nodeType == 3) {
            container.removeChild(container.childNodes[0]);
        }
        container.removeChild(container.childNodes[0]);
    }
}</span>


你可能感兴趣的:(JavaScript)