[html]window.open 使用示例
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>父窗体</title>
<style type="text/css">
html{overflow-x: hidden;}
body{overflow-x: hidden;}
</style>
<script type="text/javascript">
function openWin() {
//打开子窗体
window.open('a2.html', '_blank', 'height=400px,width=750px');
}
</script>
</head>
<body>
<input type="text" value="123" id="x" />
<a href="javascript:openWin()">类别2</a>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>子窗体</title>
<script type="text/javascript">
function onClick(){
window.opener.document.getElementById('x').value = document.getElementById('y').value;
window.close();
};
</script>
</head>
<body>
<input type="text" value="1234" id="y" />
<a href="#" onclick="onClick()">修改并关闭</a>
</body>
</html>
在 IE、Chrome 测试通过。
[html]window.open 使用示例的更多相关文章
- 实用ExtJS教程100例-006:ExtJS中Window的用法示例
在前面几个示例中,我们演示了MessageBox的各种用法,今天这篇文章将演示如何使用Window. 我们首先来创建一个窗口: var win = Ext.create("Ext.windo ...
- Window Batch编程示例
日期时间相关示例 将下面的代码保存为批处理文件 ,命名为GetDate.bat 可以在另外的批处理文件中call GetDate.bat,并直接使用GetDate.bat里面定义的变量,如下图所示: ...
- ExtJS学习之路第八步:Window组件
一个专门Panel用作程序窗口.默认的,Window可以是浮动的(floated).可缩放(resizable)以及可拖动的(draggable).Window能够被最大化适应可视窗口,(restor ...
- JavaScript window
window -- window对象是BOM中所有对象的核心 window,中文"窗口" window对象除了是BOM中所有对象的父对象外,还包含一些窗口控制函数 全局的windo ...
- JavaScript window.location对象
JavaScript window.location对象 示例 注意 方法 经常使用window.location,它的结构总是记不住,简单梳理下,方便以后查询. 示例 URL:http://b. ...
- WPF Window对象
户通过窗口与 Windows Presentation Foundation (WPF) 独立应用程序进行交互.窗口的主要用途是承载可视化数据并使用户可以与数据进行交互的内容.独立 WPF 应用程序使 ...
- selenium+python之 辨识alert、window以及操作
1.分辨 首先区别下alert.window和伪装对话框: alert,浏览器弹出框,一般是用来确认某些操作.输入简单的text或用户名.密码等,根据浏览器的不同,弹出框的样式也不一样,不过都是很简单 ...
- 为什么 window.location.search 为空?
1,什么是window.location?示例 URL:http://b.a.com:88/index.php?name=kang&when=2011#first 属性 含义 值 protoc ...
- python - 辨识alert、window以及操作
selenium之 辨识alert.window以及操作 原创 2016年08月24日 11:01:04 4820 0 2 更多关于python selenium的文章,请关注我的专栏:Python ...
随机推荐
- 51Nod 1503 猪和回文
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1503 思路: 没想到要用DP去解决. 题目是从起点出发走,我们可以从起点 ...
- TimerPickerDialog 中 onTimeSet 执行两次的问题
开发android小闹钟的程序时,在添加闹钟时闹钟列表中总是出现两个相同的闹钟. btnAddAlarm.setOnClickListener(new View.OnClickListener() { ...
- "CMAKE_CXX_COMPILER-NOTFOUND"
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CM ...
- error: device offline - waiting for device -
解决方法:重启服务 一.关闭 adb kill-server 二.启动 adb start-server 三.连接 adb connect 192.168.1.10 四.查看设备 adb device ...
- Shell脚本之无限循环的两种方法
for #!/bin/bash ;i<;)) do let "j=j+1" echo "-------------j is $j ----------------- ...
- Spring IOC 源码简单分析 02 - Bean Reference
### 准备 ## 目标 了解 bean reference 装配的流程 ##测试代码 gordon.study.spring.ioc.IOC02_BeanReference.java ioc02 ...
- css3伪放大镜(图片放大动画)效果(鼠标移入圆形区域放大图片)
源码: <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8&q ...
- Mybatis出现参数错误Parameter 'cateCode_search' not found. Available parameters are [3, 2, 1, 0, param1, param2, 5, param3, 4, param4, param5, param6]
1.参数改为序号 2.在mybatis借口上加@Param注解
- HDU 4826 (分类DP)
Labyrinth Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S ...
- iptables Configuration
iptables usage: Add Rules: iptables -I INPUT -p tcp --dport -j ACCEPT iptables -I INPUT -p tcp --dpo ...