zoukankan
html css js c++ java
窗体之间传值
帮一朋友:
其实就是解决怎么在子窗体得到父窗体句柄,那样关闭子窗体就可以把值传递回去。
父:
<
script
type
="text/javascript"
>
function
cd()
{ win
=
window.open(
"
son.htm
"
,
"
win
"
,
"
width=200,height=200
"
);}
function
son(name)
{ document.getElementById(
"
name
"
).value
=
name; }
</
script
>
<
input
type
="button"
value
="子页面"
onclick
="cd();"
>
<
input
type
="text"
id
="name"
name
=""
>
子son.htm:
<
script
type
="text/javascript"
>
function
reflesh()
{
var
parentPage
=
window.opener;
window.opener
=
null
;
parentPage.son(document.getElementById(
"
name
"
).value);
//
window.opener.location.reload(); //实现父窗体刷新
}
</
script
>
<
input
type
="button"
value
="刷新"
onclick
="reflesh();"
>
<
input
type
="text"
id
="name"
value
="刷新"
>
查看全文
相关阅读:
Mantis安装过程笔记
Python脚本文件中使用中文
String.trim的作用
Ivy入门笔记
Groovy正则表达式复杂逻辑判断实例
Build a ZenTao Server on Linux
Ubuntu上安装gevent
Install Redmine Server with Bitnami Installer
Semi-automation Script Based on Sleep
关于MySQL的事务处理及隔离级别
原文地址:https://www.cnblogs.com/ant520/p/945947.html
最新文章
EditText 使用详解
自定义 Button 选择器
自定义仿 IPhone 开关控件
自定义CheckBox样式
自定义 EditText 样式
自定义itemClickView
自定义itemCheckView
自定义ItemToggleView
Drawable 使用详解
Intent 使用详解
热门文章
Drawable与 Bitmap 转换总结
Permission 使用详解
Intent 常用方法总结
Handler 使用详解
四大布局 使用详解
Resource 使用详解
ContentProvider 使用详解
Broadcast 使用详解
Service 使用详解
Activity 使用详解
Copyright © 2011-2022 走看看