Home  >  Article  >  Web Front-end  >  How to hide controls with JavaScript_javascript skills

How to hide controls with JavaScript_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:45:591067browse

The control is visible when style.display="block" or style.visibility="visible", and is invisible when style.display = "none" or style.visibility = "hidden".
The difference is that "display" not only hides the control, but also the hidden control no longer occupies the position occupied when displayed, while the control hidden by "visibility" only sets the control to be invisible, and the control still occupies the original position. Location.





Hide the above control so that it does not occupy the position on the page




Only hides the control, its position is still occupied



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