开发者

Javascript - Disable URL in alert

On the iPad my alert('hi') pops up开发者_如何学C with a URL in the title zone. Can I turn this URL off? I do not want to see it. I am considering using some jQuery plugin as a workaround, but it sure would be nice to just fix it.


I don't think that can be turned off, alerts are defined in the browser itself. You can redefine alert (window.alert = jqueryAlertPLugin.alert) and not have to worry about your code calling the native one. I recommend the jAlert plugin. You will lose the blocking functionality of the native alert, but I bet that isn't usually an issue for most people.


You can't change the title of a javascript alert box, for user security reasons. You could use an alternative such as a pop-up <div>.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜