HTML活动框架代码

这篇博客介绍了一个HTML页面如何创建框架布局,并实现点击切换左侧导航栏的功能。使用了iframe来构建不同区域,如顶部、左侧导航和主要内容区域。通过JavaScript进行交互控制,例如根据屏幕宽度隐藏或显示导航栏。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<html>
<style type="text/css">
    .navPoint 
{COLOR: white; CURSOR: hand; FONT-FAMILY: Webdings; FONT-SIZE: 9pt}
</style>
<title>框架测试</title>
<script type="text/javascript">
    
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>
</head>
<body style="MARGIN: 0px">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  
<tr>
    
<td>
        
<!--头框架-->
        
<iframe  frameborder="0" id="top"  name="top" scrolling="no" src="../inc/top.aspx"  
            style
="HEIGHT: 60px; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 3"></iframe>
    
</td>
  
</tr>
</table>
<table border="0"  cellpadding="0" cellspacing="0" width="100%" style="height:100% ">
  
<tr>
    
<td align= "center"  id="frmTitle">
        
<!--左导航框架-->
        
<iframe   frameborder="0" id="carnoc" name="carnoc" scrolling="auto" src="Left.aspx" 
            style
="HEIGHT: 100%; VISIBILITY: inherit; WIDTH: 200px; Z-INDEX: 2"></iframe>
    
</td>
    
<td style="WIDTH: 9pt"  class="division">
    
<!--中间活动提示-->
    
<table border="0"  cellpadding="0" cellspacing="0" style="height:100%">
      
<tr>
        
<td bgcolor="#BB0000" style="HEIGHT: 100%" onclick="switchSysBar()">
        
<font style="FONT-SIZE: 9pt; CURSOR: default; COLOR: #ffffff">
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<span class="navPoint" id="switchPoint" title="关闭/打开左栏">3</span>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        
<br/>
        屏幕切换 
</font></td>
      
</tr>
    
</table>
    
</td>
    
<td style="WIDTH: 100%">
    
<!--右内容框架框架-->
    
<iframe  frameborder="0" id="main" name="main" scrolling="yes" src="cxyd/zjyd.aspx"  style="HEIGHT:95%; VISIBILITY: inherit; WIDTH: 100%; Z-INDEX: 1"></iframe>    </td>
  
</tr>
</table>
</body>
</html>
<script type="text/javascript">
if(window.screen.width<'1024'){switchSysBar()}
</script>
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值