好吧,我已经很长时间没有和JavaScript打交道了,但是我确实记得一些。我试过谷歌,但它并不是我想要的。
假设我有一个链接..。当您单击它时--一个窗口弹出框出现。你可以提交表格...然后当你按下submit时!包含您刚刚填写的表单的弹出框将关闭,并且您单击的页面将被重定向。
我该如何做到这一点呢?
发布于 2010-07-29 01:38:17
试试这个:
父页面:
<script type="text/javascript">
window.name="dansMainPage";
function popWin(link) {
var w = window.open(link.href,link.target,'width=500,height=600,resizable');
return w?false:true; // if popup blocker, use the default behaviour of the link
}
</script>
<a href="pagewithform.html" target="_blank"
onClick="return popWin(this)">Pop form</a>子页面:
<form target="dansMainPage" onSubmit="setTimeout(function() { window.close() },1000)">
.
.
.https://stackoverflow.com/questions/3354884
复制相似问题