【发布时间】:2011-05-08 14:27:34
【问题描述】:
首先,为什么要首先使用框架集?
回答:因为我老板告诉我的。
也就是说,我有 2 个文件。 Index.html 和 Head.html。
index.html 的内容:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Site Title</title>
</head>
<frameset rows="122,*" FRAMEBORDER=NO FRAMESPACING=2 BORDER=0>
<frame name="t" src="head.html" scrolling="no" marginheight="0" marginwidth="0">
<frame name="b" src="http://www.website.com">
</frameset>
<noframes>
<p>You have frames turned off on your browser, please turn it on and reload this page.</p>
</noframes>
</html>
head.html 的内容:
<div style="border-bottom:2px solid #000;height:120px">
<center>This is the frame head.</center>
</div>
该代码在除 Internet Explorer 7 和 8(我不关心 6)之外的所有浏览器中都能正常工作。有什么我做错了,如果没有,那么没有框架可以达到同样的效果吗?如果可以,怎么做?
【问题讨论】:
-
在 IE 7 和 8 中发生了什么表明它不起作用?
-
您的代码对我有用。您确定被加框的页面没有反加框 javascript 吗?
标签: html css internet-explorer frameset