本文介绍了关闭父窗口,没有提示Firefox 2和IE 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我需要知道如何在Firefox 2和IE 7中打开弹出窗口并关闭主窗口,而不是 a提示符。任何人对如何操作都有任何想法 。那个。 我目前有这个,它适用于IE 6和Firefox 1.5: 功能windowClose() { if(navigator.appName ==" Microsoft Internet Explorer") { this.focus(); self .opener = this; self.close(); } else { window.open( '' '' '' _父 '', '' ''); window.close(); } } 谢谢, Tony 解决方案 $ b $你不能。谢天谢地,开发人员听取了用户的意愿,而不是让人们关闭他们没有打开的窗户,所以现在你不能。 - 兰迪 机会有利于准备好的心灵 comp.lang.javascript常见问题 - http://jibbering.com/faq/index.html Javascript最佳实践 - http://www.JavascriptToolbox.com/bestpractices/ 嗯,你刚刚设法松开了我可能并非轻率的浏览器 历史,特别是我用来查找您网站的谷歌页面。你知道,历史,后退按钮背后的东西。 现在我必须关闭你的新窗口,打开另一个窗口,告诉google我 正在搜索并尝试导航回到我所在的位置。而且我现在已经开始使用各种谷歌搜索来获取这一点了。他们在历史上如此便利地被破坏了。 请给我你网站的网址,以便我可以将它添加到我的网站列表中/> 永远不会访问。 I need to know how to open a pop up and close the main window withouta prompt in Firefox 2 and IE 7. Anybody have any ideas on how to dothat. I currently have this and it works in IE 6 and Firefox 1.5: function windowClose(){if(navigator.appName=="Microsoft Internet Explorer"){this.focus();self.opener = this;self.close();}else{window.open('''',''_parent'',''''); window.close();}} Thanks,Tony 解决方案 You can''t. The developers, thankfully, listened to the wish of users notto have people closing windows they didn''t open so now you can''t. --RandyChance Favors The Prepared Mindcomp.lang.javascript FAQ - http://jibbering.com/faq/index.htmlJavascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/Well, you have just managed to loose my probably not inconsiderable browserhistory, particularly the google page I had used to find your site. Youknow, history, the stuff behind the back button. Now I have to close your new window, open another window, tell google what Iwas searching for and try to navigate back to where I was. And I have nowforgotton the various google searches I used to get to this point. They arein the history you so conveniently trashed. Please give me the URL of your site so I can add it to my list of sitesnever to visit. 这篇关于关闭父窗口,没有提示Firefox 2和IE 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-03 10:05