How to make a javascript alert NOT say the name of the page?

为君一笑 提交于 2020-01-04 02:29:08

问题


My webapp alert looks like this:


InputCoordinates.html

Latitude must be filled out.


I would say this looks unprofessional and rough around the edges. Is there a way to stop the alert from displaying the pagename?


回答1:


You can't manipulate that.
Maybe you take a look at these bastards called modal popups, if youre able to use jQuery.

  • http://jquery.iceburg.net/jqModal/

There are non-jquery options, too, of course.




回答2:


I'd advise you not to use "alert". Use something that allows you to style it yourself, e.g., jQuery Dialog. You can make that modal if necessary (follow the links on the right of the page I sent for add'l examples).




回答3:


Use an HTML modal box instead of the JavaScript alert() Box.

There are plenty of options to choose from on the web, e.g. here.



来源:https://stackoverflow.com/questions/9824885/how-to-make-a-javascript-alert-not-say-the-name-of-the-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!