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的有关东西!

iframe更新与隐藏的更多相关文章

  1. primefaces 通过selectOneMenu更新显示隐藏区域

    最重要的是update的区域要指定整个panel,而不是想更新的那个组件 <h:form id="frm"> <h:panelGrid id="pane ...

  2. 隐藏Layer中的Iframe内部元素

    隐藏Layer中的Iframe内部元素 1.Layer:一个web弹出层/窗解决方案 2.隐藏Layer弹出层中Iframe内部的元素,例子如下: 这个就是在Layer弹出层内的内容,加载完毕之后,获 ...

  3. iframe跨域+

    script.image.iframe的src都不受同源策略的影响.所以我们可以借助这一特点,实现跨域.如前面所介绍的JSONP跨域,以及灯标(Beacons). 该篇随笔主要阐述iframe结合一些 ...

  4. ReactNative开发笔记(持续更新...)

    本文均为RN开发过程中遇到的问题.坑点的分析及解决方案,各问题点之间无关联,希望能帮助读者少走弯路,持续更新中... (2019年3月29日更新) 原文链接:http://www.kovli.com/ ...

  5. [dedecms]隐藏栏目不生成静态页面

    重点文件在:/data/cache/inc_catalog_base.inc.php文件,里面存放的是栏目ID 先找到 /dede/sys_cache_up.php(后台更新缓存的地方),找到里面的U ...

  6. C#之使用AutoUpdater自动更新客户端

    安装NuGet包 在Visio studio中右击解决方案,选择管理NuGet包,搜索安装Autoupdater.NET.Official. 工作简介 从服务器下载包含更新文件的XML文件,从中获取软 ...

  7. jQuery post 传递 iframe

    //使用POST链接iframe function doOpenPostIfrm(url, args, iframe) { //创建一个隐藏表单 var _form = $("<for ...

  8. H5+app -- 自动更新

    一.最近做了一个app自动更新功能,用的基本都是网上找得到的. 1.h5+ 规范 :  http://www.html5plus.org/doc/zh_cn/maps.html 2.环形进度条插件:h ...

  9. iframe滚动条充当浏览器滚动条

    在做博客项目的时候,使用了iframe,方便根据选择的文章类别切换显示的内容,但是文章一般都有很多,通过bootstrap的媒体列表的方式显示的话,iframe是一定会出现滚动条的,特别是我添加了一个 ...

随机推荐

  1. javascript事件与event对象的属性

    javascript事件列表解说 事件 浏览器支持 解说 一般事件 onclick IE3.N2 鼠标点击时触发此事件 ondblclick IE4.N4 鼠标双击时触发此事件 onmousedown ...

  2. jQuery积累

    一:Google的CDN(内容分发网络) <head> <script type="text/javascript" src="http://ajax. ...

  3. Sexagenary Cycle(天干地支法表示农历年份)

    Sexagenary Cycle Time Limit: 2 Seconds      Memory Limit: 65536 KB 题目链接:zoj 4669 The Chinese sexagen ...

  4. Freemarker遍历map

    map的键尽量是字符串或者数字类型: <#if map?exists> <#list map?keys as key> ${key}---${map[key]} </#l ...

  5. B树算法与实现 (C语言实现)

    B树的定义 假设B树的度为t(t>=2),则B树满足如下要求:(参考算法导论) (1)  每个非根节点至少包含t-1个关键字,t个指向子节点的指针:至多包含2t-1个关键字,2t个指向子女的指针 ...

  6. PGA

    Server Process PGA   1.PGA作用   2.PGA構成      1)private sql area      2)session memory          3)sql ...

  7. Datagard產生gap

    本文轉載自無雙的小寶的博客:http://www.cnblogs.com/sopost/archive/2010/09/11/2190085.html 有時候因為網路或備份故障等原因,主機所產生的歸檔 ...

  8. C和C++的头文件总结

    stdafx.h 的英文全称为:Standard Application Framework Extensions(标准应用程序框架的扩展) iostream.h 是input output stre ...

  9. HTML Entity Sets - All

    http://www.htmlentities.com/html/entities/ The view below displays the characters used in the offici ...

  10. Hibernate 和 快照

    Hibernate我们已经学了四天,该讲的知识我们已经讲完,明天放假,后天练习一天就要结束hibernate的学习,有点不舍的,想来hibernate也不是传说中的那么难,在次将hibernate中三 ...