嵌套的EasyUI 怎么获取对象
说明:
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="打开" /> <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 怎么获取对象的更多相关文章
- 【Python】[面性对象编程] 获取对象信息,实例属性和类属性
获取对象信息1.使用isinstance()判断class类型2.dir() 返回一个对象的所有属性和方法3.如果试图获取不存在的对象会抛出异常[AttributeError]4.正确利用对象内置函数 ...
- JS中isPrototypeOf 和hasOwnProperty 的区别 ------- js使用in和hasOwnProperty获取对象属性的区别
JS中isPrototypeOf 和hasOwnProperty 的区别 1.isPrototypeOf isPrototypeOf是用来判断指定对象object1是否存在于另一个对象object2的 ...
- python动态获取对象的属性和方法 (转载)
首先通过一个例子来看一下本文中可能用到的对象和相关概念. #coding:utf-8 import sys def foo():pass class Cat(object): def __init__ ...
- java获取对象属性类型、属性名称、属性值
/** * 根据属性名获取属性值 * */ private Object getFieldValueByName(String fieldName, Object o) { try { String ...
- python基础——获取对象信息
python基础——获取对象信息 当我们拿到一个对象的引用时,如何知道这个对象是什么类型.有哪些方法呢? 使用type() 首先,我们来判断对象类型,使用type()函数: 基本类型都可以用type( ...
- QuerySet创建新对象的方法和获取对象的方法
新建一个对象的方法有以下几种: Person.objects.create(name=name,age=age) p = Person(name="WZ", age=23) p.s ...
- jquery attr()方法 添加,修改,获取对象的属性值。
jquery attr()方法 添加,修改,获取对象的属性值. jquery中用attr()方法来获取和设置元素属性,attr是attribute(属性)的缩写,在jQuery DOM操作中会经常用到 ...
- 各浏览器对使用 document.id 和 document.name 获取对象的支持存在差异
标准参考 无. 问题描述 各浏览器使用 document.id 和 document.name 方法获取对象引用的支持存在差异. 造成的影响 某些浏览器中通过 document.id 和 docume ...
- python动态获取对象的属性和方法
http://blog.csdn.net/kenkywu/article/details/6822220首先通过一个例子来看一下本文中可能用到的对象和相关概念.01 #coding: UTF- ...
随机推荐
- net6:用户添加到角色和移出角色,角色的创建与删除等Roles与Membership的使用
原文发布时间为:2008-07-30 -- 来源于本人的百度文章 [由搬家工具导入] using System;using System.Data;using System.Configuration ...
- Day 17 编码+文本编辑+函数
知识点篇: #! /usr/bin/env python # -*- coding: utf-8 -*- # __author__ = "DaChao" # Date: 2017/ ...
- TStringList,快速解析 查找测试。。。很有用,再也不用 FOR 循环了
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABKAAAALHCAIAAAA2Gq0zAAAgAElEQVR4nOydeVgUV76wK5OZb5JJZi
- Android Q 兼容那些事
文章微信公众号「AndroidTraveler」首发 5 月 20 号参加了 Android Q Labs,因此本篇说一说会议的部分内容以及自己的一些想法. 会议主要是加深开发者对 Android Q ...
- vue报错之Duplicate keys detected: '0'. This may cause an update error.
昨天运行vue项目的时候,出现了[Vue warn]: Duplicate keys detected: '0'. This may cause an update error(错误,检测到重复的ke ...
- Loj #2036. 「SHOI2015」自动刷题机
link : https://loj.ac/problem/2036 这个显然具有单调性,N小的话更容易A题,不仅因为A一次题减少的代码,并且A题的下限也低. 所以直接上二分就行了,注意上限一定不要设 ...
- Loj #125. 除数函数求和(2)
link : https://loj.ac/problem/125 分块calc即可. #include<bits/stdc++.h> #define ll long long using ...
- SQL Server 2008 镜像的监控 - Joe.TJ -
http://www.cnblogs.com/Joe-T/archive/2012/09/06/2673237.html
- js和jquery 实现网站来消息网站标题闪动提示
js版 <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"&g ...
- hdu5373
题先附上:水题,可是思路不正确,特easy超时(TLE) The shortest problem Time Limit: 3000/1500 MS (Java/Others) Memory L ...