刪除函數(shù)這樣為什么不行呢?
function del(obj)
? ? ?{
? ? ? ? var a=document.getElementById("table");
? ? ? ? a.removeChild(a.childNodes[1]);
? ? ?}
為什么這讓會整個刪除了?
function del(obj)
? ? ?{
? ? ? ? var a=document.getElementById("table");
? ? ? ? a.removeChild(a.childNodes[1]);
? ? ?}
為什么這讓會整個刪除了?
2015-05-11
舉報
2015-05-12
document.getElementById("table").lastChild這樣寫試試