JS - how to remove image with JavaScript?

前端 未结 9 1409
孤独总比滥情好
孤独总比滥情好 2021-02-13 11:27

I faced a problem as to remove image with JS code like a...


...
document.getElementById(\'image_X\').src=\'\'
         


        
9条回答
  •  长发绾君心
    2021-02-13 12:23

    1) remove img element using parent node. 2) Then, Store that parent node. 3) Then, create new img element in that parent node.

提交回复
热议问题