removechild

    32熱度

    7回答

    是否有可能刪除除身體標記之外沒有其他父項的dom元素?我知道用jQuery這樣的框架很容易,但我試圖堅持直接的JavaScript。 下面的代碼,我發現以其他方式做到這一點: function removeElement(parentDiv, childDiv){ if (childDiv == parentDiv) { alert("The parent div cann

    5熱度

    2回答

    我正在寫一個腳本,需要在頁面上移動一個包裹節點元素。我發現當我這樣做時,我將先前包裹的孩子刪除。我如何打開一個節點的孩子,以便我可以在其他地方移動父節點? 我的想法是這樣的: var parg = document.getElementById("blah"); if (parg.hasChildNodes()) { var children = parg.chil

    2熱度

    5回答

    快樂前萬聖節前夕大家:) 我今天的問題是我得到的時候刪除一個子對象的DisplayObject錯誤。我有代碼將啓動(addChild)視頻容器和視頻控件以及添加關閉按鈕。 Now the close button works fine and everything,刪除視頻和控制,我能夠再次選擇其他的視頻,但是當您單擊關閉第二次我得到這個錯誤: 引發ArgumentError:錯誤#2025:提供

    0熱度

    1回答

    我把MC放在一個數組中,並希望稍後從索引中刪除它,直到結束爲止。 //Removeing MC from stage, from an index till the end LISTmc.removeChild(listArray[clickedIndex+1]); //Removing MC starting from an index till the end listArray.sp

    1熱度

    3回答

    我在我的舞臺上加載了一些swf文件。他們是我網站的頁面。 要從一個頁面更改頁面我使用removeChildAt(0),然後addChildAt(「page_title」,0)。 問題是,removeChild不要從第一個swf文件加載(卸載前)刪除功能。 那我該怎麼辦? 我是否必須使用其他方式removeChild? Thanx!