一个简单的收缩菜单

来源:互联网 发布:淘宝apple store怎么样 编辑:程序博客网 时间:2024/04/28 00:04
<script>
function showhide(which){
 if( which.style.display=="none"){
  which.style.display=""
 }else{
  which.style.display="none"
 }
}
</script>
<table width="80%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#666666" onclick="showhide(content1)" style="color:white;cursor:hand">open1</td>
  </tr>
  <tr id="content1" style="display:none">
    <td>content1</td>
  </tr>
  <tr>
    <td bgcolor="#999999" onclick="showhide(content2)" style="color:white;cursor:hand">open2</td>
  </tr>
  <tr id="content2" style="display:none">
    <td>content2</td>
  </tr>
</table>
open1
open2
原创粉丝点击