其他分享
首页 > 其他分享> > JS common keywords examples and tricks

JS common keywords examples and tricks

作者:互联网

1.in js add id to html element and delete it

var elem = document.getElementById("zzz");if (elem!=null) elem.parentElement.removeChild(elem);

.attr({ id: "nps", })

2.in js delete a few type of elements

标签:parentElement,tricks,elem,js,common,keywords,JS,id,delete
来源: https://www.cnblogs.com/hytvszz/p/13540549.html