jQuery showing and hiding divs:
Display:
$("#id").show()
Hide:
$("#id").show()
JS shows and hides divs:
The visibility of the div can control the display and hiding of the div, but the page will appear blank after hiding it
style="visibility: none;"
document.getElementById("typediv1").style.visibility="hidden";//Hide
document.getElementById("typediv1").style.visibility="visible";//Display
By setting the display attribute, you can hide the div and release the occupied page space, as follows
style="display: none;"
document.getElementById("typediv1").style.display="none";//Hide
document.getElementById("typediv1").style.display="";//Display
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn