<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>frameset应用</title>
</head>
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
<frameset name="full" rows="64,*,64" framespacing="0" frameborder="0">
<frame name="top" scrolling="no" xnoresize target="contents" src="top.htm">
<frameset cols="125,8,*" name="cen">
<frame name="contents" src="../treeviewdg.aspx" target ="main" frameborder="0"
noresize marginwidth="0" topmargin="0" leftmargin="0" marginheight="0">
<frame id="toolFrame" name = "toolFrame" src="image.htm" frameborder="0" scrolling="no" noresize marginwidth="0"
topmargin="0" leftmargin="0" marginheight="0" >
<frame id ="main" name="main" src="HTMLPage.htm" frameborder="0" scrolling="no"
noresize marginwidth="0" topmargin="0" leftmargin="0" marginheight="0">
<noframes>
此 HTML 框架集显示多个 Web 页。若要查看此框架集,请使用支持 HTML 4.0 及更高版本的 Web 浏览器。
</noframes>
</frameset>
<frame name="bottom" scrolling="no" xnoresize target="main" src="buttom.htm">
<noframes>
<body>
<p>此 HTML 框架集显示多个 Web 页。若要查看此框架集,请使用支持 HTML 4.0 及更高版本的 Web 浏览器。</p>
</body>
</noframes>
</frameset>
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
</html>
说明:如果需要点击其他的frame 中的链接在<frame id = "main" name = "main"> 中显示,需要在所链接的加Target = "main"(在指定frame中frame的名称) 如:
<a href ="../treeviewdg.aspx" target ="main">在main中显示链接</a>
如采用左右框架的.左边用Treeview 的,则需要在Treeview加载结点的时候添加 (节点)tmpNode.Target = "main"(右边frame名称);
显示/隐藏左边框架相关说明:
<html>
<head>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="ProgId" content="VisualStudio.HTML">
<meta name="Originator" content="Microsoft Visual Studio .NET 7.1">
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
<script language="javascript">![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function tour_tool()
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(window.parent.cen.cols=="0,8,*")
{
toolimg.src="bt_mline_on.gif";
tour_tree.title="隐藏导航栏图标";
window.parent.cen.cols="125,8,*";
}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
else
{
toolimg.src="bt_mline_off.gif";
tour_tree.title="显示导航栏图标";
window.parent.cen.cols="0,8,*";}
}
</script>
</head>
<body>
<TABLE id="Table1" cellSpacing="0" cellPadding="0" border="0" height="100%" bgColor="#e8f4ff">
<TR>
<TD align="left" background="images/bar_blank.gif" width="1"></TD>
<TD vAlign="middle" align="center"><div id="tour_tree" onclick="tour_tool();" title="隐藏导航栏图标"><IMG id="toolimg" src="bt_mline_on.gif" style="CURSOR:hand" hspace="0" border="0"></div>
</TD>
</TR>
</TABLE>
</body>
</html>
程序下载: Files/ipusr/frame.rar
参照: Files/ipusr/framset.rar