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

原文地址:https://www.cnblogs.com/hytvszz/p/13540549.html