How to hide HTML element with JavaScript

1 Answer

0 votes
<p id="id-p">HTML content</p>

<button type="button" onclick="document.getElementById('id-p').style.display='none'">
    Click</button>

 



answered Aug 28, 2016 by avibootz

Related questions

2 answers 424 views
1 answer 309 views
1 answer 377 views
1 answer 260 views
1 answer 337 views
1 answer 429 views
...