首先,爲什麼在你問的第一個地方使用框架?Frameset在IE中無法正常工作
回答:因爲我的老闆告訴我。
這就是說,我有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表明它不工作? – 2010-04-17 17:19:36
你的代碼適合我。你確定頁面被框住沒有反框架的JavaScript? – Alohci 2010-04-17 18:43:52