Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在codeigniter中自动关闭弹出窗口并重定向到codeigniter中的父窗口。我是codeigniter的新手,请回答我用于anchor_popup()创建窗口的任何正文。
anchor_popup()
要创建一个弹出窗口,在幕后使用类似这样的东西
var win = window.open("http://www.google.com",null,"height=320,width=200");
当您从原始页面移动时,该窗口保持打开状态。但是,您可以挂钩 unload 事件以关闭窗口:
window.addEventListener("unload",function() { win.close(); });
请注意,addEventListenerIE<9 不支持,您可以在其中使用attachEvent。
addEventListener
attachEvent