admin管理员组文章数量:1397093
For a standard Javascript alert()
box, is it possible to have it appear in a position other than the center of the screen? Can you specify horizontal and/or vertical position?
For a standard Javascript alert()
box, is it possible to have it appear in a position other than the center of the screen? Can you specify horizontal and/or vertical position?
- (Yes, I'm aware that alert() is a terrible UI choice. I have a harmless prank in mind.) – Nathan Long Commented Sep 2, 2009 at 16:13
2 Answers
Reset to default 4Afaik, it cannot be positioned where you want it.
Instead of using the default js alert box, you can always use one of the JS framework / toolkit solutions that offer way more in terms of functionality and customization.
I'm personally a fan of jQuery and jQueryUI
Indeed, I would personally discourage you from using Javascript alert() boxes altogether - they look 1995-ish and don't provide for a nice, customizable user experience. Instead, like the other poster suggested, use a standard Javascript library that will allow you to pop up a "modal" floating DIV, as well as paint a semi-transparent color all over the background, which will make for a beautiful, understandable, easy-to-use user interface.
本文标签: Is it possible to create a noncentered Javascript alert boxStack Overflow
版权声明:本文标题:Is it possible to create a non-centered Javascript alert box? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744148168a2592935.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论