[英]Clickable link in javascript alert box
Is it possible to add an anchor tag in an alert box using jquery? 是否可以使用jquery在警报框中添加锚标记? I am trying to show a clickable link in the alert box of jquery, but I can only get text in the box.
我正在尝试在jquery的警报框中显示可单击的链接,但是我只能在该框中获取文本。
alert('<a href= "http://www.google.com">Please read the rules</a>')
How do I get this done in jquery? 如何在jquery中完成此操作?
It's impossible to place any HTML code into alert dialogs. 不可能将任何HTML代码放入警报对话框。 You'd better consider using some JavaScript based dialogs (for example from https://jqueryui.com/dialog/ )
您最好考虑使用一些基于JavaScript的对话框(例如,来自https://jqueryui.com/dialog/ )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.