element display none javascript code example
Example 1: display none js
document.getElementById("myDIV").style.display = "none";
Example 2: javascript display block
document.getElementById("someElementId").style.display = "block";
Example 3: how to make div visible and invisible in javascript
elem.style.display = 'none'; // hide
elem.style.display = 'block'; // show - use this for block elements (div, p)
elem.style.display = 'inline'; // show - use this for inline elements (span, a)