Hide parent element with onclick function

前端 未结 3 1193
暗喜
暗喜 2020-12-19 15:10

I use jQuery most of the time, so I am having a bit of trouble with the following (simple) javascript:

I want to dismiss(hide) the parent element of a p tag when cli

3条回答
  •  难免孤独
    2020-12-19 15:23

    dismiss this box

    function dismiss(el){ el.parentNode.style.display='none'; };

提交回复
热议问题