JavaScript PopUp and Redirect parent windows when close down(弹出窗口 关闭后主页面跳转)
2012-10-16 06:34
633 查看
How to PopUp a new window
PS: the Top and Left could control the layout of the new windows
like: top=100; left=100;
Use the JavaScript
When Close the PopUp, the Parents window redirect to other page
<script>
window.opener.location = "../index.html";
window.close();
</script>
Or
<script>
function windowsClose(){
window.opener.location = "../index.html";
window.close();
}
</script>
<script language="javascript" type="text/javascript"> <!-- function popitup(url) { newwindow=window.open(url,'name','height=200,width=150'); if (window.focus) {newwindow.focus()} return false; } // --> </script>
PS: the Top and Left could control the layout of the new windows
like: top=100; left=100;
Use the JavaScript
<a href="popupex.html" onclick="return popitup('popupex.html')" >Link to popup</a>
When Close the PopUp, the Parents window redirect to other page
<script>
window.opener.location = "../index.html";
window.close();
</script>
Or
<script>
function windowsClose(){
window.opener.location = "../index.html";
window.close();
}
</script>
相关文章推荐
- fancybox 关闭弹出窗口 parent.$.fancybox.close(); 无反应 fancybox 关闭弹出窗口父页面自动刷新,弹出子窗口前后事件
- “当页面跳转或者关闭窗口时弹出提示窗口!”JAVASCRIPT实例
- 解决JavaScript页面刷新 与 弹出窗口问题 无提示关闭窗口
- fancybox关闭弹出窗口parent.$.fancybox.close();
- 当主页面关闭时关闭所有子窗口(Close all the child windows on unload of main page)
- javascript 父页面单击按钮,弹出窗口,接受用户输入,关闭当前弹出窗口,返回父页面
- fancybox关闭弹出窗口parent.$.fancybox.close();
- JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome (Close the current page window without confirm by JavaScript, support all browsers)
- 当页面跳转或者关闭窗口时弹出提示窗口
- window.close(); 直接关闭页面 防止弹出“您查看的网页真该试图关闭窗口。是否关闭此窗口?”
- javascript弹出及关闭窗口及页面刷新问题总结。
- 一个非常实用的C#弹出对话框类(包括弹出对话框,跳转到指定页面,关闭窗口)
- PHP+JAVASCRIPT实现自动弹出打印窗口并自动跳转页面的实例
- 当主页面关闭时关闭所有子窗口(Close all the child windows on unload of main page)
- JS弹出框、对话框、提示框,JS关闭窗口、关闭页面和JS控制页面跳转
- JavaScript 强行弹出窗口 与 无提示关闭页面
- JavaScript无提示关闭当前页面窗口,兼容IE/Firefox/Chrome (Close the current page window without confirm by JavaScript, support all browsers)
- fancybox关闭弹出窗口parent.$.fancybox.close();
- fancybox关闭弹出窗口parent.$.fancybox.close();
- Javascript跳转页面和打开新窗口等方法