javascript开发系列(多框架)
来源:互联网 发布:淘宝上架商品没有品牌 编辑:程序博客网 时间:2024/05/01 19:39
opener.window表示打开它的原框架。
top表示顶部框架,
parent引用包含这个窗口的window对像
例子如下;
a.htm页面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function a(url,w,h) {
var x = window.screen.availWidth/2-w;
var y = window.screen.availHeight/2-h;
var str = "height="+h+",width="+h+",top="+y+",left="+x+",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no";
window.open(url, "_blank", str);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="atxtName" runat="server" onclick="a('aa.aspx','100','500')"></asp:TextBox>
</div>
</form>
</body>
</html>
aa.html页面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
function aa() {
opener.window.document.getElementById('atxtName').value = 'txtd';
opener.window.document.bgColor = 'red';
parent.parent.document.bgColor = 'blue';
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="aatxtName" runat="server" onclick='aa()'></asp:TextBox>
</div>
</form>
</body>
</html>
- javascript开发系列(多框架)
- javascript开发系列(框架、窗口)
- Lite系列开发框架
- JavaScript前端开发框架
- javaScript框架开发
- 系列:iOS开发-框架搭建
- javascript开发系列(直接量)
- javascript开发系列(运算符)
- javascript开发系列(DOM操作)
- Javascript RIA框架开发要点
- 通用办公业务平台开发框架研究系列(1)-开发框架的必要性
- ArcGIS Server 开发系列(一)--编程框架总览
- ArcGIS Server 开发系列(一)--编程框架总览
- ArcGIS Server 开发系列(一)–编程框架总览
- ArcGIS Server 开发系列(一)--编程框架总览
- 【EasyAndroidDev框架开发系列】开篇 (持续更新...)
- 使用Mootools开发JavaScript单元测试框架javascript
- Android开发学习JavaScript系列(一):准备
- Nginx导致页面发送给错误的用户
- Android应用技巧总结
- 无锡NIIT软件外包学院第20班大爆料!
- struts国际化小结
- axis2创建webservice客户端全过程(调用.net web服务)
- javascript开发系列(多框架)
- /dev/null 2>&1 详解
- 对VS2008生成智能win32程序简单理解
- 漆黑的夜
- 绑定DropDownList控件
- 测试基本术语 (一)
- HttpService 传递参数的方法
- PHP交换数组中的元素和值
- 【转】svn强制要求提交注释--pre-commit钩子