javascript怎么使一个页面的值返回到另一个页面?
初学js,请问怎么使一个页面的值返回到上一级页面中的文本域中? 问题点数:0、回复次数:4Top
1 楼stefli()回复于 2004-05-02 16:08:54 得分 0
页面间有关系没有,如果有,那就可以处理咯~
写个简单的:
1.html
---------------------------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Author" CONTENT="stefli,^_^stefli">
<META NAME="Description" CONTENT="http://www2.gliet.edu.cn/gdhq/kudesign/">
<title>页面传递参数</title>
</head>
<body>
<form name="form1">
<input type="text" id="stefli">
<input type="button" onClick="window.open('2.html','Win_2','width=300,height=100')" value="选择参数">
</body>
</html>
2.html
---------------------------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Author" CONTENT="stefli,^_^stefli">
<META NAME="Description" CONTENT="http://www2.gliet.edu.cn/gdhq/kudesign/">
<title>页面传递参数</title>
</head>
<body>
<form name="form1">
<input type="text" id="stefli" value="Design By Stefli">
<input type="button" onClick="opener.document.form1.stefli.value=document.form1.stefli.value;opener=null;window.close()" value="提交参数">
</body>
</html>Top
2 楼hb8069(新人)回复于 2004-05-02 16:17:17 得分 0
楼上的,myQQ:32819150,我想详细的问一下,行吗?Top
3 楼stefli()回复于 2004-05-02 16:56:51 得分 0
1.html
---------------------------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Author" CONTENT="stefli,^_^stefli">
<META NAME="Description" CONTENT="http://www2.gliet.edu.cn/gdhq/kudesign/">
<title>页面传递参数</title>
<script language="javascript">
<!--//主页面的
function InputCustom(name) {
document.all.customerName.value = name;
}
//-->
</script>
</head>
<body>
<form name="form1">
<input type="text" id="customerName">
<a style="cursor:hand" onClick="window.open('2.html','Win_2','width=300,height=100')">选择参数</a>
</body>
</html>
2.html
---------------------------------------------------------------------------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META NAME="Author" CONTENT="stefli,^_^stefli">
<META NAME="Description" CONTENT="http://www2.gliet.edu.cn/gdhq/kudesign/">
<title>页面传递参数</title>
<script language="javascript">
<!--//弹出页面
function InputCustom(name) {
opener.InputCustom(name);
opener=null;
window.close();
}
//-->
</script>
</head>
<body>
<form name="form1">
<input type="text" id="stefli" value="Design By Stefli">
<input type="button" onClick="Javascript:InputCustom(document.all.stefli.value)" value="提交参数">
</body>
</html>Top
4 楼vc_pioneer(继续革命)回复于 2004-05-03 09:29:37 得分 0
window.open后使用opener可调入.Top
相关问题
- 如何用Javascript将模式对话框返回值赋给主页面的DropDownList1
- 提交页面取返回值问题
- 妹妹关于Javascript页面返回history.go(-1)问题,急等
- 如何用javascript返回提交页面..............急.....................
- 如何在用javascript:history.back();返回后自动刷新返回后的页面
- 静态页面打开的新窗口怎么返回值到原页面
- 如何在一个ASP页面中调用另一个ASP页面,并取到它的页面返回值
- 进入页面后提示! 确定进入 取消返回原先的页面。==●● javascript
- 使用Javascript如何返回窗体上的日期控件的选择值到父窗体页面.出现问题.
- 请问页面提交返回值问题




