幫忙解釋一段java腳本
<td height= "25 "> <a href= "javascript: " onClick= "if (im1.style.display== 'block ')im1.style.display = 'none ';else im1.style.display= 'block ' "> 發文管理 </a> </p>
<table width= "100% " border= "0 " id= "im1 " style= "display:none ">
<tr>
<td> <p align= "center "> <a href= "fa1.asp " target= "mainFrame " > <span class= "style2 "> 發布發文 </span> </a> </p>
<p align= "center " class= "style2 "> <a href= "faguan.asp " target= "mainFrame "> <span class= "style2 "> 發文管理 </span> </a> </p> </td>
幫忙逐行解釋一下做菜單的java腳本
謝謝!
------解决方案-------------------- <td height= "25 "> <a href= "javascript: " onClick= "if (im1.style.display== 'block ')im1.style.display = 'none ';else im1.style.display= 'block ' "> 發文管理 </a> </p> ' '显示和隐藏菜单,点击的时候是隐藏的话,则展开,展开的话则隐藏。
<table width= "100% " border= "0 " id= "im1 " style= "display:none "> ' '默认是隐藏状态。
后面的就不用解释了吧?
------解决方案--------------------im1.style.display== 'block ';(显示)
im1.style.display = 'none;(不显示)
im1是你table的id啊!
table width= "100% " border= "0 " id= "im1 "