div+js實現iframe效果
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Chomo" />
<link rel="start" href="http://www.14px.com" title="Home" />
<title>div仿框架佈局</title>
<style type="text/css">
* { margin:0; padding:0; list-style:none;}
html { height:100%; overflow:hidden; background:#fff;}
body { height:100%; overflow:hidden; background:#fff;}
div { background:#f60; line-height:1.6;}
.top { position:absolute; left:10px; top:10px; right:10px; height:50px;}
.side { position:absolute; left:10px; top:70px; bottom:70px; width:200px; overflow:auto;}
.main { position:absolute; left:220px; top:70px; bottom:70px; right:10px; overflow:auto;}
.bottom { position:absolute; left:10px; bottom:10px; right:10px; height:50px;}
/*---ie6---*/
html { _padding:70px 10px;}
.top { _height:50px; _margin-top:-60px; _margin-bottom:10px; _position:relative; _top:0; _right:0; _bottom:0; _left:0;}
.side { _height:100%; _float:left; _width:200px; _position:relative; _top:0; _right:0; _bottom:0; _left:0;}
.main { _height:100%; _margin-left:207px; _position:relative; _top:0; _right:0; _bottom:0; _left:0;}
.bottom { _height:50px; _margin-top:10px; _position:relative; _top:0; _right:0; _bottom:0; _left:0;}
</style>
<script>
/** 初始化載入頁面 **/
jQuery(document).ready(function(){
document.getElementById("iframe").src='index.htm';
})
/**** 網頁跳轉到頁面頂部 ****/
function parentGoTop(){
$(function(){$('html, body').animate({
scrollTop: 0
},0);});
}
/**** 根據連結地址跳轉頁面 ****/
function clicklist(uri){
document.getElementById("iframe").src=uri;
parentGoTop();
}
</script>
li a{
float:left;
width:200px;
display:block;
}
</style>
</head>
<body>
<div class="top"></div>
<div class="side">
<ul class='menu'>
<li><strong>資源專版快訊管理</strong></li>
<li><a onClick="clicklist('mail.htm');"> 釋出網上資源/供求專版 </a></li>
<li><a onClick="clicklist('mystow.htm');"> 推薦資源釋出</a></li>
<li><a onClick="clicklist('mypay.htm');"> 供求快訊釋出</a></li>
<li><a onClick="clicklist('head.htm');"> 供求快訊重發/修改/刪除</a></li>
</ul>
</div>
<div class="main">
<IFRAME id="iframe" src="" height='850px' width="700" frameBorder=0 scrolling=yes></IFRAME>
</div>
<div class="bottom"></div>
</body>
</html>