admin管理员组文章数量:1357577
Am looking at whatever hacks that are possible to keep a window always on top (apart from window.focus()). Maybe a hidden textbox to which I can set focus etc.
I see this happening in LivePerson (support) whenever a new message arrives. I have legitimate use of this and not to annoy users with ads or anything.
Any hacks for any browsers will do. I am not looking at a plete cross-browser solution. I think window.focus would work for Internet Explorer, though I am yet to test it.
Am looking at whatever hacks that are possible to keep a window always on top (apart from window.focus()). Maybe a hidden textbox to which I can set focus etc.
I see this happening in LivePerson (support) whenever a new message arrives. I have legitimate use of this and not to annoy users with ads or anything.
Any hacks for any browsers will do. I am not looking at a plete cross-browser solution. I think window.focus would work for Internet Explorer, though I am yet to test it.
Share Improve this question asked Aug 30, 2010 at 17:37 Alec SmartAlec Smart 96k39 gold badges124 silver badges186 bronze badges 2- 1 Please don't do this, however legitimate your purpose if it's not optional it's unwele (albeit this is my own opinion, and causes me to leave sites even more rapidly than blinking banner ads). – David Thomas Commented Aug 30, 2010 at 17:48
- See newer answers here: stackoverflow./questions/14565310/… – Erel Segal-Halevi Commented Jan 30, 2013 at 8:13
1 Answer
Reset to default 3This JavaScript code will place the popup window on top of all other open browser windows until the viewer closes the window containing this little JavaScript code:
<body onblur="self.focus();">
本文标签: javascriptPopup window always on topStack Overflow
版权声明:本文标题:javascript - Popup window always on top - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744077097a2586949.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论