http://blog.sina.com.cn/s/blog_535161d80100aho6.html
从近期项目中抽取出来的一个关于iframe进行控制的代码,不是很全,不过大体功能已经显示出来了,此代码已经在IE8上测试通过!
<html>
<head>
//更新iframe局部,并动态控制其显示、隐藏----js代码
<script language="javascript">
function showTree(linkids)
{
if(linkids==1||linkids==2||linkids==3)
{
document.tree.location="loadTree.do?linkid="+linkids;
//$("#tree").css({"display":"none"}); //在此处利用jQuery来隐藏iframe是无效的的。这也在IE8中测试过。
document.getElementByIdx("tree").style.display="";
}
else
{
document.getElementByIdx("tree").style.display="none";
}
}
</script>
</head>
//母页html
<BODY leftmargin="0" topmargin="0" onload="showTree(0);">
<table cellpadding="0" cellspacing="0" width="158" align="center">
<tr>
<td height="20"><a href="loadOnlinePeopleAction.do?er=1" target=right style=" CURSOR:hand" name="golink" id="1"
onclick='showTree(this.id);'> 节点历史在线人数查询</a></td>
</tr>
<tr>
<td height="20"><a href="pages/currently/currently.do" target=right style=" CURSOR:hand" name="golink" id="2"
onclick='showTree(this.id);'> 运营商当前在线人数查询</a></td>
</tr>
<tr>
<td height="20"><a href="pages/firm/UOnlinepeople.do?er=1" target=right style=" CURSOR:hand" name="golink" id="3"
onclick='showTree(this.id);'>运营商历史在线人数查询</a></td>
</tr>
<tr>
<td height="20"><a href="pages/fill/fillreckon.do?er=1" target=right
style=" CURSOR:hand" name="golink" id="4" onclick='showTree(this.id);'>用户充值总计</a></td>
</tr>
</table>
//嵌入iframe
<iframe id="tree" name="tree" align="left" frameborder="1" width="158px" height="260px" scrolling="auto">
</iframe>
</BODY>
</html>
===========================================================================================
呵呵,贴贴关于iframe的有关东西!