Home >Web Front-end >JS Tutorial >Click to hide the left or right column of the page to implement js code_javascript skills

Click to hide the left or right column of the page to implement js code_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:38:491134browse

点击隐藏页面左栏或右栏(同一TABLE中)

复制代码 代码如下:


<script> <br>function switchSysBar(){ <br>if (switchPoint.innerText==3){ <br>switchPoint.innerText=4 <br>document.all("frmTitle").style.display="none" <br>}else{ <br>switchPoint.innerText=3 <br>document.all("frmTitle").style.display="" <br>}} <br></script>




































3















屏幕切换

想把隐藏左右栏的那个按钮按成图片,改一下JS,IMG增加ID,这里id=aa,也可以换成其它的名称,参考如下:
<script> <br>function switchSysBar(){ <br>if (document.all.aa.src.indexOf("bl_1")!=-1){ <br>aa.src="images/al_1.gif" <br>document.all("frmTitle").style.display="none" <br>}else{ <br>aa.src="images/bl_1.gif" <br>document.all("frmTitle").style.display="" <br>} <br>} <br></script>






   

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