0
我弹出窗口,在弹出窗口中做了一些事情之后,我想返回主窗口。现在,我的弹出窗口出现在主窗口上的窗体。从弹出窗口调用主窗口
function checkForm() {
//check all necessary things
var varAmount =....; //which will get after process insides javascript
window.location = 'myaction.action?amount='+varAmount ;
}
<form name="frmUpload" target="main">...
<input type="button" class="button" value="Save" onclick="checkForm();"/>
</form>
我想金额值传递给我的动作太并希望返回到主窗口(并且这个过程完成后,要关闭弹出窗口,并调用myaction.actoin)。
虽然我打电话target="main"
,但它不会关闭弹出窗口并返回到主窗口。
使用iframe并在上传时创建目标 – 2012-03-13 07:25:45
弹出窗口中的'window.opener'将指向打开它的窗口或主窗口。 – kirilloid 2012-03-13 07:57:33