1.htm
***********************
<html>
<head><title>1.htm</title></head>
<body>
参数一:<input type=text name=t1><br>
参数二:<input type=text name=t2><br>
<hr>
<input type=button name=b1 value="打开新窗口" onclick="window.open('2.htm','','')">
</body>
</html>2.htm
***********************
<html>
<head><title>2.htm</title></head>
<body>
<script>
function set(){
window.opener.t1.value="第一个参数";
window.opener.t2.value="第二个参数";
}
</script>
<input type=button value=传递参数 onclick=set()>
</body>
</html>
***********************
<html>
<head><title>1.htm</title></head>
<body>
参数一:<input type=text name=t1><br>
参数二:<input type=text name=t2><br>
<hr>
<input type=button name=b1 value="打开新窗口" onclick="window.open('2.htm','','')">
</body>
</html>2.htm
***********************
<html>
<head><title>2.htm</title></head>
<body>
<script>
function set(){
window.opener.t1.value="第一个参数";
window.opener.t2.value="第二个参数";
}
</script>
<input type=button value=传递参数 onclick=set()>
</body>
</html>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货