分享

可打开关闭的左右分栏(代码)

 张金富 2011-07-18

<html>
<head>
<title>可关闭/打开的左右分栏</title>
<meta http-equiv="content-Type" content="text/html;charset=gb2312">
<!--把下面代码加到<head>与</head>之间-->
<style>.navpoint {
 color: white; cursor: hand; font-family: webdings; font-size: 9pt
}
</style>
<script>
function switchSysBar(){
 if (switchPoint.innerText==3){
  switchPoint.innerText=4
  document.all("frmTitle").style.display="none"
 }
 else{
  switchPoint.innerText=3
  document.all("frmTitle").style.display=""
 }
}
</script>
</head>
<!--把<body>改为-->
<body scroll="no" style="margin:0px">
<!--把下面代码加到<body>与</body>之间-->
<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
    <td id="frmTitle" name="fmTitle" align="middle" valign="center" noWrap><iframe id="left" name="left" frameBorder="0" src="about:blank" style="height:100%;visibility:inherit;width:143px;z-index:2"></iframe>
    <td bgcolor="#425bb8" style="width:10pt">
      <table height="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td onclick="switchSysBar()" style="height:100%"><span id="switchPoint" class="navPoint" title="关闭/打开左栏">3</span></td>
  </tr>
   </table>
 </td>
    <td style="width: 100%"><iframe id="frmright" name="frmright" frameBorder="0" scrolling="no" src="about:blank" style="height:100%;visibility:inherit;width:100%;z-index:1"></iframe></td>
  </tr>
</table>
</body>
</html>

上下分栏

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


script中的3,4改成5,6箭头就是上下方向,
我先调整成上部站页面高度的90%,下部为10%,

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多