说明:

1、本篇文章介绍的是,怎么获取嵌套的Easyui 中的id为pageDetail的iframe对象

2、刚开始的页面效果如下图,是一个只有north,center区域的easyUI  easyui-layout布局,单击“打开”按钮,会在center区域再嵌套一个easyUI的布局

3、单击“打开”按钮 页面效果如下图所示

4、单击“获取”按钮,获取到嵌套的easyUI中id为pageDetail的iframe

5、主要HTML代码

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link href="Easyui/themes/default/easyui.css" rel="stylesheet" />
<link href="Easyui/themes/icon.css" rel="stylesheet" />
<script src="Easyui/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="Easyui/jquery.easyui.min.js"></script>
<script src="Easyui/locale/easyui-lang-zh_CN.js"></script>
<script src="JS/jquery.cookie.js"></script>
<script src="JS/sysUtil.js"></script>
<script type="text/javascript">
$(function () {
$('#btnDK').on('click', function () {
$("#pageUrl").attr("src", "pageDetailInfo.aspx");
});
$('#btnHQ').on('click', function () {
$("#pageUrl").contents().find('#pageDetail').attr("src", "HQInfo.aspx");
var width1 = $("#pageUrl").contents().find('#layout2').layout('panel','west').panel('options').width;
});
});
</script>
</head>
<body id="layoutone" class="easyui-layout">
<div data-options="region:'north',split:true,title:'north'" style="width:100%;height:150px;">
<input type="button" id="btnDK" value="打开" /> &nbsp;&nbsp;&nbsp;<input type="button" id="btnHQ" value="获取" />
</div>
<div data-options="region:'center',title:'center'">
<iframe id="pageUrl" style="border:none;width:100%;height:100%;" ></iframe>
</div>
</body>
</html>

6、pageDetailInfo.aspx代码如下

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<link href="Easyui/themes/default/easyui.css" rel="stylesheet" />
<link href="Easyui/themes/icon.css" rel="stylesheet" />
<script src="Easyui/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="Easyui/jquery.easyui.min.js"></script>
<script src="Easyui/locale/easyui-lang-zh_CN.js"></script>
</head>
<body id="layout2" class="easyui-layout">
<div data-options="region:'west',title:'west',split:true" style="width:300px;">
<iframe id="pageDetail" style="border:none;width:100%;height:100%;" ></iframe>
</div>
<div data-options="region:'center',title:'center'">345435</div>
</body>
</html>

7、HQInfo.aspx代码如下

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
获取成功
</div>
</form>
</body>
</html>

嵌套的EasyUI 怎么获取对象的更多相关文章

  1. 【Python】[面性对象编程] 获取对象信息,实例属性和类属性

    获取对象信息1.使用isinstance()判断class类型2.dir() 返回一个对象的所有属性和方法3.如果试图获取不存在的对象会抛出异常[AttributeError]4.正确利用对象内置函数 ...

  2. JS中isPrototypeOf 和hasOwnProperty 的区别 ------- js使用in和hasOwnProperty获取对象属性的区别

    JS中isPrototypeOf 和hasOwnProperty 的区别 1.isPrototypeOf isPrototypeOf是用来判断指定对象object1是否存在于另一个对象object2的 ...

  3. python动态获取对象的属性和方法 (转载)

    首先通过一个例子来看一下本文中可能用到的对象和相关概念. #coding:utf-8 import sys def foo():pass class Cat(object): def __init__ ...

  4. java获取对象属性类型、属性名称、属性值

    /** * 根据属性名获取属性值 * */ private Object getFieldValueByName(String fieldName, Object o) { try { String ...

  5. python基础——获取对象信息

    python基础——获取对象信息 当我们拿到一个对象的引用时,如何知道这个对象是什么类型.有哪些方法呢? 使用type() 首先,我们来判断对象类型,使用type()函数: 基本类型都可以用type( ...

  6. QuerySet创建新对象的方法和获取对象的方法

    新建一个对象的方法有以下几种: Person.objects.create(name=name,age=age) p = Person(name="WZ", age=23) p.s ...

  7. jquery attr()方法 添加,修改,获取对象的属性值。

    jquery attr()方法 添加,修改,获取对象的属性值. jquery中用attr()方法来获取和设置元素属性,attr是attribute(属性)的缩写,在jQuery DOM操作中会经常用到 ...

  8. 各浏览器对使用 document.id 和 document.name 获取对象的支持存在差异

    标准参考 无. 问题描述 各浏览器使用 document.id 和 document.name 方法获取对象引用的支持存在差异. 造成的影响 某些浏览器中通过 document.id 和 docume ...

  9. python动态获取对象的属性和方法

    http://blog.csdn.net/kenkywu/article/details/6822220首先通过一个例子来看一下本文中可能用到的对象和相关概念.01     #coding: UTF- ...

随机推荐

  1. 【CF1029A】Many Equal Substrings(模拟)

    题意:给定一个长度为n的串s,要求构造一个长度最小的使s出现了k次的串,可以重叠 n<=50,k<=50 思路:计算一下前后缀相同长度 #include<cstdio> #in ...

  2. 【CF387D】George and Interesting Graph(二分图最大匹配)

    题意:给定一张n点m边没有重边的有向图,定义一个有趣图为:存在一个中心点满足以下性质: 1.除了这个中心点之外其他的点都要满足存在两个出度和两个入度. 2.中心 u 需要对任意顶点 v(包括自己)有一 ...

  3. Change visual studio 2015 enterprise installation path(转)

    I would like to install VS2015 in a drive different than C:. The problem is that when I run the inst ...

  4. Codeforces 932 B.Recursive Queries-前缀和 (ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined))

    B. Recursive Queries   time limit per test 2 seconds memory limit per test 256 megabytes input stand ...

  5. Java1.8新特性——接口改动和Lambda表达式

    Java1.8新特性——接口改动和Lambda表达式 摘要:本文主要学习了Java1.8的新特性中有关接口和Lambda表达式的部分. 部分内容来自以下博客: https://www.cnblogs. ...

  6. 匿名块的四个类型(type rowtype record table)

    Oracle PL/SQL块 匿名块的四个类型 type rowtype record table ---- type (列类型)  %type类型是指声明变量的时候,参考某个表的某个列的类型---- ...

  7. Maven修改默认中央仓库

    其实Maven的默认仓库是可以修改的.比如使用阿里云的镜像地址等. 修改步骤: 1.打开{M2_HOME}/conf/settings.xml文件,找到mirrors节点,修改如下代码: <mi ...

  8. 给button添加长按手势并侦测到此button

    1, 添加手势 self.longPressRecognizer = [[UILongPressGestureRecognizer alloc]initWithTarget:self action:@ ...

  9. [NSThread sleepForTimeInterval:3.0];

    在- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)laun ...

  10. SilverLight:布局(3)StackPanel 对象

    ylbtech-SilverLight-Layout: 布局(3)StackPanel 对象 A, Nesting Layout Containers(内嵌布局容器) B, StackPanel(队列 ...