Frameset 两页面互调控件技术案例
2024-10-21 15:43:45
总共包含三个页面(Html),分别为Parent.Html、ChildA.Html、ChildB.Html
Parent.Html页面代码
<frameset cols="50%,*">
<frame name="left" src="1.html">
<frame name="right" src="2.html">
</frameset>
ChildA.Html页面代码
<html>
<head>
<script>
function setValue() {
window.parent.document.getElementById("right").contentWindow.document.getElementById("txt2").value = document.getElementById("txt1").value;
}
</script>
</head>
<body>
<input type="text" id="txt1" onkeyup="setValue()" />
</body>
</html>
ChildB.Html页面代码
<html>
<head>
<script>
function setValue() {
window.parent.document.getElementById("left").contentWindow.document.getElementById("txt1").value = document.getElementById("txt2").value;
}
</script>
</head>
<body>
<input type="text" id="txt2" onkeyup="setValue()" />
</body>
</html>
最新文章
- Python 批量修改文件名
- switch
- codeforces 519E A and B and Lecture Rooms LCA倍增
- android 进程/线程管理(四)续----消息机制的思考(自定义消息机制)
- Spark服务启动的一些总结
- php--jquery操作全选、批量删除、加减行
- JSON 之 SuperObject(10): Merge、Clone、ForcePath
- Umbraco部署到IIS中权限问题(back office没有权限新建template)
- objcopy
- 各种电子面单_Api接口
- USACO5.4-TeleCowmunication
- 笔试、面试重点总结:WIN32、MFC与Linux
- Windows 10下Markdown不能显示预览
- web安全之机器学习入门——2.机器学习概述
- 牛客OI周赛7-提高组 B小睿睿的询问(ST打表)
- Java虚拟机 内存区域划分
- angular中的ng-options 用法
- es手动创建索引,修改索引,删除索引
- android view surfaceView GLSurfaceView
- 蜗牛慢慢爬 LeetCode 2. Add Two Numbers [Difficulty: Medium]
热门文章
- SQL server 2008里面通过sys.dm_exec_procedure_stats得到存储过程的执行信息--转
- 【划分树+二分】HDU 4417 Super Mario
- Centos6 安装 Redis 和集群配置
- CentOS6.5卸载默认安装的mysql5.1,并安装mysql5.5(亲测有效)
- 【C语言】二维数组中的查找,杨氏矩阵
- 51单片机晶振11.0592M延时函数
- some issues that you should be take care of when use the plupload module
- 稳固而窒息 jquery attr 和 Prop的区别
- plink参数说明
- iPhone How-to:如何调整UIView的Z-Order