您的位置:首页 > 其它

简单的搭建Web系统常用的框架页面

2007-07-20 08:32 453 查看
本示例实现效果为:
1.框架frames.htm页面分上中下三部分
其中中部又分左中右三部分
2.各框架的src组成为
上导航菜单页面a
左菜单页面b 中隐显左侧菜单的页面c 右主显页面d
底部状态页面e
3.点击a的导航
联动到b的菜单 e的状态
点击b的菜单
联动到d的页面显示
点击c的相关td位置
将隐藏或显示左侧的b页面
===========================
相关代码如下
============
frames.htm
-----------
<html>
<head>
<title>frames</title>
</head>
<frameset rows="70,*,50" cols="*" frameborder="NO" border="0" framespacing="0" id="frame1">
<frame name="banner" scrolling="no" noresize src="a.htm" frameborder="0">
<frameset rows="*" cols="200,10,*" frameborder="NO" border="0" framespacing="0" id="frame2">
<frame name="leftmenu" scrolling="auto" noresize src="b.htm" frameborder="0">
<frame name="showhidemenu" scrolling="no" noresize src="c.htm" frameborder="0">
<frame name="rightmain" scrolling="auto" src="d.htm" frameborder="0">
</frameset>
<frame name="status_bar" scrolling="no" noresize src="e.htm" frameborder="0">
</frameset>
</html>

------
a.htm
------
<html>
<head>
<title></title>
</script>
</script>
</head>
<body>
<table width="100%">
<tr>
<td onclick="menu_click('A');">图书分类A</td>
<td onclick="menu_click('B');">图书分类B</td>
</tr>
</table>
</body>
</html>

------
b.htm
------
<html>
<head>
</script>
</head>
<body>
<table width="100%">
<tr>
<td onclick="GetDataToRight()"><div id="divLeftMenu"></div></td>
</tr>
</table>
</body>
</html>

------
c.htm
------
<html>
<head>
<title>控制左菜单隐藏或显示</title>
</script>
</head>
<body topmargin="0" leftmargin="0" STYLE="margin:0pt;padding:0pt" onload="leftmenu_ctrl()">
<TABLE cellspacing="0" width="100%" height="100%" cellpadding="0" align="center" class="col">
<TR>
<TD>
<TABLE cellspacing="0" width="100%" height="50" bgcolor="#EEEEEE" border="1" >
<TR onclick="leftmenu_ctrl()">
<TD style="cursor:hand;">
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</body>
</html>

------
d.htm
------
<html>
<head>
</script>
</head>

<body>
<table width="100%">
<tr height="10">
<td align="right" id="tdShowTop" onclick="showhideTop();" >
隐藏上方
</td>
</tr>
<tr>
<td><div id="divRightMain"></div></td>
</tr>
</table>
</body>
</html>

------
e.htm
------
<html>
<body>
<table width="100%">
<tr>
<td><div id="divNowState"></div></td>
<td></td>
</tr>
</table>
</body>
</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐