a.asp :点一下输入框,弹出一个网页对话框
里面如果有个数字是22 ,我想关闭网页对话框后,让它变成44
b.asp:就是哪个弹出的网页对话框
结果令我失望,变成了2222
a.asp:
1<html>
2<head>
3<title> New Document </title>
4<meta content="EditPlus" name="Generator"/>
5<meta content="" name="Author"/>
6<meta content="" name="Keywords"/>
7<meta content="" name="Description"/>
8</head>
9<script language="JavaScript">
10function Calendar(s) {
11
12var sPath = "b.asp";
13var strFeatures = "dialogWidth=206px;dialogHeight=210px;center: Yes;dialogHide: Yes; help: No; resizable: No; status: No;unadorned:Yes ";
14var codes = s.value;
15var sDate = showModalDialog(sPath,codes,strFeatures);
16s.value = sDate;
17}
18
19
20
21</script>
22<body>
23888888
24
25<input name="button1" onclick="Calendar(this)" type="text" value="22"/>
26</body>
27</html>
b.asp:
1<html>
2<head>
3<title> New Document </title>
4<meta content="EditPlus" name="Generator"/>
5<meta content="" name="Author"/>
6<meta content="" name="Keywords"/>
7<meta content="" name="Description"/>
8</head>
9<script language="JavaScript">
10
11window.onload = initWindow;
12function initWindow() {
13
14// alert("open");
15window.returnValue = window.dialogArguments;
16
17}
18
19function dateChange() {
20var i;
21i = window.dialogArguments + window.dialogArguments;
22
23window.returnValue = i;
24window.close();
25}
26
27
28
29
30</script>
31<body>
32good.asp
33
34<input name="" onclick="dateChange()" type="button" value="close"/>
35</body>
36</html>
---------------------------------------------------------------
哦,改这一个就可以了
var codes = Number(s.value);