感谢大家帮忙了!!! 用window.open打开son.jsp然后在son.jsp中window.opener.document.getElementById('returnValue').value='the value...'; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function return() { dialogArguments.document.getElementById("returnValue").value="asdasdasdasdasd"; //var strReturn; //strReturn=document.getElementById("paraFiles").value; // window.returnValue =strReturn; window.close(); } father.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Untitled Document</title> <script language="javascript"> var $ = document.getElementById; window.onload = function(){ var val = window.showModalDialog("son.html"); if (val != null) { $("text1").value = val; } } </script> </head> <body> This is my JSP page. <br> <form id='test' action="XXX.jsp" method="post" target='_blank'> <input type="text" id='text1'/> <input type='submit' value='提交'> </form> </body></html>son.html<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script language="javascript"> var $ = document.getElementById; function ret(){ window.returnValue = $("paraFiles").value; window.close(); } </script> </head> <body> <input type="text" id="paraFiles" value=""> <INPUT onclick="ret()" type="button" value="返回"> </body></html> js className的兼容性问题 急!求js正则表达式 请各位大侠帮忙:在javascrit中读取word文档内容的问题! 页面载入完了,状态栏怎么还在读 请问我这段验证Email的正则怎么错了?请教高手 网页加了meta标签,为什么还显示是乱码?急!!! 页面的宽度和高度怎么获取?(请大家回答一下了,不要因为太简单) 一个页面由两个不同的页面组成,如何在一个页面控制另一个页面的层是显示还是不显示? 虽然问题很简单,但是我不会,大家进来看看 关于用javascript 做下拉菜单的问题? 这个小游戏使用javascript写的吗 如何根据css名给dt加入事件处理
{
dialogArguments.document.getElementById("returnValue").value="asdasdasdasdasd";
//var strReturn;
//strReturn=document.getElementById("paraFiles").value;
// window.returnValue =strReturn;
window.close();
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script language="javascript">
var $ = document.getElementById;
window.onload = function(){
var val = window.showModalDialog("son.html");
if (val != null) {
$("text1").value = val;
}
}
</script>
</head>
<body>
This is my JSP page.
<br>
<form id='test' action="XXX.jsp" method="post" target='_blank'>
<input type="text" id='text1'/>
<input type='submit' value='提交'>
</form>
</body>
</html>son.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="javascript">
var $ = document.getElementById;
function ret(){
window.returnValue = $("paraFiles").value;
window.close();
}
</script>
</head>
<body>
<input type="text" id="paraFiles" value="">
<INPUT onclick="ret()" type="button" value="返回">
</body>
</html>