zoukankan
html css js c++ java
JS5月项目积累
用模式子窗口对父窗口进行赋值
父窗口的代码:
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
>
<
HTML
>
<
HEAD
>
<
title
>
Parent Webform
</
title
>
<
script
language
="javascript"
>
function
OpenChild()
{
var
ParmA
=
retvalA.value;
var
ParmB
=
retvalB.value;
var
ParmC
=
retvalC.value;
var
MyArgs
=
new
Array(ParmA, ParmB, ParmC);
var
WinSettings
=
"
center:yes;resizable:no;dialogHeight:300px
"
//
ALTER BELOW LINE - supply correct URL for Child Form
var
MyArgs
=
window.showModalDialog(
"
b.html
"
, MyArgs, WinSettings);
if
(MyArgs
==
null
)
{
window.alert(
"
Nothing returned from child. No changes made to input boxes
"
)
}
else
{
retvalA.value
=
MyArgs[
0
].toString();
retvalB.value
=
MyArgs[
1
].toString();
retvalC.value
=
MyArgs[
2
].toString();
}
}
</
script
>
</
HEAD
>
<
body
>
<
P
><
INPUT
id
="retvalA"
type
="text"
value
="AAA"
></
P
>
<
P
><
INPUT
id
="retvalB"
type
="text"
value
="BBB"
></
P
>
<
P
><
INPUT
id
="retvalC"
type
="text"
value
="CCC"
></
P
>
<
P
><
BUTTON
onclick
="OpenChild()"
type
="button"
>
Open Child Window
</
BUTTON
>
</
P
>
</
body
>
</
HTML
>
模式子窗口代码:
<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
>
<
HTML
>
<
HEAD
>
<
TITLE
>
Child Webform
</
TITLE
>
<
script
language
="javascript"
>
function
Done()
{
var
ParmA
=
tbParamA.value;
var
ParmB
=
tbParamB.value;
var
ParmC
=
tbParamC.value;
var
MyArgs
=
new
Array(ParmA, ParmB, ParmC);
window.returnValue
=
MyArgs;
window.close();
}
function
doInit()
{
var
ParmA
=
"
Aparm
"
;
var
ParmB
=
"
Bparm
"
;
var
ParmC
=
"
Cparm
"
;
var
MyArgs
=
new
Array(ParmA, ParmB, ParmC);
MyArgs
=
window.dialogArguments;
tbParamA.value
=
MyArgs[
0
].toString();
tbParamB.value
=
MyArgs[
1
].toString();
tbParamC.value
=
MyArgs[
2
].toString();
}
</
script
>
</
HEAD
>
<
BODY
onload
="doInit()"
>
<
P
>
Param A:
<
INPUT
id
="tbParamA"
TYPE
="text"
></
P
>
<
P
>
Param B:
<
INPUT
ID
="tbParamB"
TYPE
="text"
></
P
>
<
P
>
Param C:
<
INPUT
ID
="tbParamC"
TYPE
="text"
></
P
>
<
BUTTON
onclick
="Done()"
type
="button"
>
OK
</
BUTTON
>
</
BODY
>
</
HTML
>
查看全文
相关阅读:
element-ui中tabs页设置第一个页面不可关闭
验证实现element-ui树形控件的自定义图标及右键菜单
vue项目接口地址的定义
js数组与字符串的相互转换方法
vue的双向绑定原理及实现
vue中的懒加载和按需加载
使用gulp将移动端px转为rem
百度搜索--jquery
关于Ajax中http协议
用nodejs搭建一个简单的服务器
原文地址:https://www.cnblogs.com/RuiLei/p/756923.html
最新文章
1.7.3能停止的线程-异常法
1.7.2判断线程是否是停止状态
1.7.1停止不了的线程
1.6getId()方法
1.7停止线程
1.5sleep()方法
Longest Increasing Subsequence
【台阶问题】
【2018多校第一场】hdu6308-Time Zone(日期)
【51nod-1521】一维战舰
热门文章
【51nod-1432】独木舟
【51nod-1315】合法整数集(数位)
【51nod-1278】相离的圆(二分)
【51nod-1138】连续整数的和
【51nod-1289】大鱼吃小鱼(思维)
【51nod-1091】线段的重叠(贪心)
在vue-cli项目中使用echarts
树表格的实现
实现界面全屏展示
vue项目中引入element-ui时,如何更改主题色
Copyright © 2011-2022 走看看