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

posted @ 2020-08-21 13:30  HeyJudeee  阅读(112)  评论(0)    收藏  举报