JS to set the control to hide and display, set the control style display and visibility properties on it, there is an example, the need for friends can refer to the following
There are two ways to hide a control with JavaScript, respectively, by setting the display and visibility properties of the control's style.
Controls are not visible when style.display= "block" or style.visibility= "visible" or when style.display= "none" or style.visibility= "hidden". The difference is that "display" hides the control, and the hidden control no longer occupies the display, while the "visibility" hidden control simply sets the control to invisible, and the control still occupies its original position.
functionDisplayhideui () {varUI =document.getelementbyid ("BBS"); Ui.style.display= "None"; } functionDisplayshowui () {varUI =document.getelementbyid ("BBS"); Ui.style.display= "";//If display is empty, the block will wrap the space behind it.functionVisibilityhideui () {varUI =document.getelementbyid ("BBS"); Ui.style.visibility= "Hidden"; } functionVisibilityshowui () {varUI =document.getelementbyid ("BBS"); ui.style.visibility= "Visible"; }
Two ways to hide and display JS settings control