最赞回答 / 今朝似梦愿回昨
event.srcElement.checked获得复选框的原始状态
感谢 楼下@qq_queserasera_13323100的这个评论!
”因为每次删除第0个子节点,下一个子节点又变成了第0个,所以循环体内不用写i++
for(var i=0;i<content.children.length;){
content.removeChild(content.children[i])
}”
”因为每次删除第0个子节点,下一个子节点又变成了第0个,所以循环体内不用写i++
for(var i=0;i<content.children.length;){
content.removeChild(content.children[i])
}”
2019-09-10
最新回答 / 你又调皮
table.onmouseover=function(e){ if(e.target.tagName.toLowerCase()=="td"){ e.target.parentNode.style.backgroundColor="#ccc"; }else if(e.target.tagName.toLowerCase()=="a"){ e.target.parentNode.parentNode.style.backgroundColor="#ccc"; } } table.onm...
2019-09-08