代码改变世界

关于Div下拉菜单浮动在frameset上的解决方案。

2011-01-13 16:29  假面Wilson  阅读(4072)  评论(0编辑  收藏  举报

通过以下四个页面,可以实现。

index.html
---------------------------------
<html>
<head>
<title>this is my title</title>
</head>

<frameset rows="*" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
<frame name="divframe" src="go.html" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" noresize scrolling="no">
</frameset>

<noframes>
<body>
sorry your browser doesn't accept frames
</body>
</noframes>
</html>


oldindex.html
---------------------------------
<frameset rows="30,*" style="z-index:1">
<frame src="topframe.html" style="z-index:1">
<frameset cols="30,*" style="z-index:1">

<frame src="topframe.html" style="z-index:1">
<frame src="topframe.html" style="z-index:1">

</frameset>
<frame src="topframe.html" style="z-index:1">
</frameset>


topframe.html
---------------------------------
<html>
<head>
</head>
<body>

<a onclick="top.divframe.document.getElementById('dude').style.display='block'">Go!</a>

</body>
</html>


go.html
---------------------------------
<html>
<body>


<div id='dude' class='' style="position:absolute;float:left;top=5;left=25;display='none';z-index:2;"><table bgcolor='009900'><tr><td>***<br><br>***this is my content...***<br><br>***</td></tr></table></div>

<iframe src="oldindex.html" width=100% height=100% marginwidth=0>

</body>
</html>