浏览 1726 次
锁定老帖子 主题:显示和隐藏frame
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2011-12-30
<%@ page contentType="text/html; charset=UTF-8"%> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>分隔栏</title> <link rel="stylesheet" type="text/css" href="../style/icode.css" /> <script language="JavaScript"> function Submit_onclick(){ if(parent.myFrame.cols == "200,6,*") { parent.myFrame.cols="0,6,*"; document.getElementById("ImgArrow").src="../images/arrow_r.gif"; document.getElementById("ImgArrow").alt="打开左侧导航栏"; } else { parent.myFrame.cols="200,6,*";//200,6,*都代表的是宽度 document.getElementById("ImgArrow").src="../images/arrow_l.gif"; document.getElementById("ImgArrow").alt="隐藏左侧导航栏"; } } function MyLoad() { if(window.parent.location.href.indexOf("MainUrl")>0) { window.top.leftFrame.document.getElementById("ImgArrow").src="../images/arrow_l.gif"; } } </script> <style> html { width: 100%; height: 100%; } body { width: 100%; height: 100%; } #switchbody { background-color: #DFE8F0;; height: 100%; width: 100%; margin: 0; padding: 0; } #switchpic { width: 6px; cursor: pointer; vertical-align: bottom; margin-top: 220px; } </style> </head> <body id="switchbody" onload="MyLoad()"> <div id="switchpic"><a href="javascript:Submit_onclick()"><img src="../images/arrow_l.gif" alt="隐藏左侧导航栏" name="ImgArrow" border="0" id="ImgArrow" /></a>e<span class="style1">r</span></div> </body> </html>
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |