Delete a div or span with a id=“.xxx”

后端 未结 8 917
被撕碎了的回忆
被撕碎了的回忆 2021-01-19 10:45

I am unable to delete a div with an id with a period or an asterix.

8条回答
  •  隐瞒了意图╮
    2021-01-19 11:25

    In pure javascript, you can use :

    var tmp = document.getElementById('xyz');
    tmp.parentNode.removeChild(tmp);
    

提交回复
热议问题