开发者

Show hyperlinks in javascript alert

开发者 https://www.devze.com 2023-01-24 23:29 出处:网络
Is it possible to show hyperlinks in javascript alerts? I mean, if I do something like alert(\"<a href=\'http://stackoverflow.com\'>LINK</a>\");

Is it possible to show hyperlinks in javascript alerts? I mean, if I do something like

alert("<a href='http://stackoverflow.com'>LINK</a>");
开发者_高级运维

the alert will show only the plain text "LINK".

Is it possibile to show it like a clickable url?

Thanks


It is possible if you make your own web browser, which you won't do, because… well, just because. Otherwise, it's impossible (still).

However, alert has always sucked, so a modal dialog may be better.


Not possible. Use "custom" alert dialog, you have plenty jQuery plugins for this.

0

精彩评论

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