iframe可收縮的後管理

<html>
<meta http-equiv=Content-Type content=text/html;charset=gb2312>
<title>mobaihuo网站后台免费提供_脚本之家_www.jb51.net</title>
<!--这里的样式的重点是指当鼠标移到三角按钮时变成手掌-->
<style type="text/css">
.navPoint 
{COLOR: white; CURSOR: hand; FONT-FAMILY: Webdings; FONT-SIZE: 9pt}
.a2
{BACKGROUND-COLOR: A4B6D7;}
</style>
<!--以下代码就是重点,屏幕切换点击后相应的向左或者向右展开-->
<script>
if(self!=top){top.location=self.location;}
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>
<!--以上代码就是重点,屏幕切换点击后相应的向左或者向右展开-->
<!--onresize 事件 发生在窗口被调整大小的时候。carnoc是左边FRAME的ID。-->
<body style="MARGIN: 0px" scroll=no onResize=javascript:parent.carnoc.location.reload()>
<TABLE style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0 height="50">
<TR>
<TD align=center width="100%" height=25 bgcolor="#B1C1E0" style="COLOR: #330099; font: 10.5pt"
><B>mobaihuo网站后台免费提供</B>
</TD>
</TR>
</TABLE>
<table border="0" cellPadding="0" cellSpacing="0" height="100%" width="100%">
 
<tr>
  
<td width="30" align="middle" vAlign="center" noWrap id="frmTitle"><!--注意这里的ID,它返回给上面那段javascript的-->
  
  
<!--以下是左边的FRAME,你只要做一个宽为180PX的页面嵌套进去就可以了。当然你也可以修改这句里WIDTH的值为你叶子的宽度-->
  
<iframe frameBorder="0" id="carnoc" name="carnoc" scrolling=auto src="" style="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 180px; Z-INDEX: 2">  </iframe>  </td>
  
<!--同志们请注意下面这个TD,它的颜色就是中间跑来跑去分栏部分的颜色,你可以在这里将颜色改成与你页面融洽的颜色-->
  
  
<td width="46" bgcolor="#708EC7" style="WIDTH: 9pt">
  
  
<!--哈哈,看到了吧,中间的那个跑来跑去的栏实际上去一个TABLE哦!TABle的宽度就是那条栏的宽度-->
  
<table width="9" height="100%" border="0" cellpadding="0" cellspacing="0">
   
<tr>
    
<td width="200" style="HEIGHT: 100%" onClick="switchSysBar()"><!--这里调用上面的switchSysBar过程-->
      
<font style="FONT-SIZE: 9pt; CURSOR: default; COLOR: #ffffff">
      
      
<!--这里你可以把3改成1或者其他数字来看看就发现了是形状问题了-->
      
<span class="navPoint" id="switchPoint" title="关闭/打开左栏">3</span>

  屏幕切换
</font></td>
   
</tr>
  
</table></td>
    
<td style="WIDTH: 100%">  s  </td>
 
</tr>
</table>
</html>

申明

非源创博文中的内容均收集自网上,若有侵权之处,请及时联络,我会在第一时间内删除.再次说声抱歉!!!

博文欢迎转载,但请给出原文连接。

原文地址:https://www.cnblogs.com/Athrun/p/1419224.html