Javascript onclick hide div

后端 未结 4 1777
不知归路
不知归路 2020-12-08 04:42

I want to hide this warning div using javascript inside it.

I\'m i getting the javascript right? I want to hide/close the div when i click on the close icon (images/

4条回答
  •  我在风中等你
    2020-12-08 05:13

    HTML

    Warning:These are new productsClose

    Javascript:

    function hide(obj) {
    
        var el = document.getElementById(obj);
    
            el.style.display = 'none';
    
    }
    

提交回复
热议问题