一个页面中有两个iframe

来源:互联网 发布:Linux下修改sftp端口 编辑:程序博客网 时间:2024/04/27 16:27

点击左边iframe,内容显示在右边的iframe


代码:

  <script type="text/javascript">
//初始化
function initItem(){
var params="?approSeq="+<%=approSeq%>+"&proSeq="+<%=proSeq%>;
window.frames["leftFrame"].location.href = "<%=basePath %>/monitor/showLeftMonthList.action"+params;
}

</script>

<body onLoad="initItem();" >
    <!-- 左边菜单栏,显示月份 proid由此列表产生 -->
     <div style="float:left ; width:100%;">
<!-- 左侧iframe -->
    <div id="monthList"  style=" float:left ; width:18% ;  height:1400px; border:2px">
    <iframe style="position:relative;" height="100%"  id="leftFrame"  name="leftFrame" width="100%"  src=""></iframe>
    </div>
    <!-- 右侧iframe -->
    <div id="dataDetail"  style=" float:right ; width:82% ;  height:1400px; border:2px">
    <iframe style="position:relative;" height="100%"  id="rightFrame"  name="rightFrame" width="100%"  src="<%=basePath %>/monitor/noDataPage.html"></iframe>
    </div>
</div> 
  </body>

0 0
原创粉丝点击