在线等待 请教 如何将 弹出窗口的 值 掉回本页面?? window.opener 引用父窗口,然后象处理父窗口中的对象了,与处理本窗口中的对象没什么区别。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在本页面中定义变量xx,在弹出窗口中给它赋值opener.xx=... 你可以用returnvalue;value = window.open(".....");在弹出框的中按确认时:returnValue = ????;就可以把值传到父窗体中 楼主好,下午有事儿出去了,不知道楼主在等,抱歉呀!:)1.htm:<html><head><title>Untitled Document</title><script language="JavaScript" type="text/JavaScript"><!--function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features);}//--></script></head><body><form id="form1" name="form1" method="post" action=""> <select name="select" id="dlist"> </select> <input name="Button" type="button" onClick="MM_openBrWindow('2.htm','none','width=400,height=300')" value="Button"></form></body></html>2.htm:<html><head><title>Untitled Document</title></head><body><form name="form1" id="form1" method="post" action=""> <input name="textfield" type="text" id="txtText" size="20"> <input name="textfield2" type="text" id="txtValue" size="10"> <input type="button" name="Button" value="add" onClick="f();"> <script language="JavaScript" type="text/JavaScript">function f() { var doc = window.opener.document; var dlist = doc.form1.dlist; var oOption = doc.createElement("OPTION"); dlist.add(oOption); oOption.innerText = document.form1.txtText.value; oOption.value = document.form1.txtValue.value; window.close(); dlist.onresize();} </script></form></body></html>onresize 好像不太好使,如果要做清除处理的话更麻烦些。也不知道这些对楼主是否有帮助。 用structs做,把方法写在action里就,调用对应的setXXX方法就可以了! 在js级解决,就用window.returnValue在后台解决,就用set/get Attribute () My97DatePicker 日历控件遇到的问题 问大家一个问题关于需求设计的有个功能不知道怎么去实现 c3p0提示信息 请问java的base64encoder加密的数据在php中该如何解密? a标记传值到另一个jsp页面中如何取出? 关于jspsmartupload中文名下载乱码的问题,解决即给分! jsp中向一个文本写东西的疑问? 在jb下可以运行,可是在ie里怎么就报错呢?大家帮下忙把! 请高手指点,很急 请教? Hibernate3查询方式的选择,有Hibernate开发经验的给点建议吧,先谢过了. JSP简单错误问题。。。。SOS求救!
returnvalue;value = window.open(".....");在弹出框的中按确认时:
returnValue = ????;就可以把值传到父窗体中
<head>
<title>Untitled Document</title>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
</head><body>
<form id="form1" name="form1" method="post" action="">
<select name="select" id="dlist">
</select>
<input name="Button" type="button" onClick="MM_openBrWindow('2.htm','none','width=400,height=300')" value="Button">
</form>
</body>
</html>2.htm:<html>
<head>
<title>Untitled Document</title>
</head><body>
<form name="form1" id="form1" method="post" action="">
<input name="textfield" type="text" id="txtText" size="20">
<input name="textfield2" type="text" id="txtValue" size="10">
<input type="button" name="Button" value="add" onClick="f();">
<script language="JavaScript" type="text/JavaScript">
function f() {
var doc = window.opener.document;
var dlist = doc.form1.dlist;
var oOption = doc.createElement("OPTION");
dlist.add(oOption);
oOption.innerText = document.form1.txtText.value;
oOption.value = document.form1.txtValue.value;
window.close();
dlist.onresize();
}
</script>
</form>
</body>
</html>onresize 好像不太好使,如果要做清除处理的话更麻烦些。也不知道这些对楼主是否有帮助。
在后台解决,就用set/get Attribute ()