[英]Can I incorporate a link in a message box in javascript?
I would like to add a link in my javascript messagebox function. 我想在我的javascript messagebox函数中添加一个链接。 Is there a way to do that? 有没有办法做到这一点?
TodayDate = new Date();
if (sender._selectedDate < new Date(TodayDate.getYear(), TodayDate.getMonth()-1, 1))
{
alert("Only current and previous months active.\n\nPlease visit\n
Agency ...HOMEPAGE...\nfor Archive Commissions");
sender._selectedDate = new Date();
}
No, this is not supported. 不,这不受支持。 You need to create your own modal dialog using an absolutely-positioned DIV. 您需要使用绝对定位的DIV创建自己的模态对话框。
A javascript framework, such as jQuery , makes this a relatively easy task. 一个javascript框架,比如jQuery ,使这个任务变得相对简单。
There are several jQuery plugins that allow you to create a div with your dialog content on the page, and that div becomes a JavaScript dialog when the show dialog event fires. 有几个jQuery插件允许您在页面上创建带有对话框内容的div,并且当show对话框事件触发时,该div将成为JavaScript对话框。 They can be easily styled, and also most include pre and post event callback functionality 它们可以轻松设置样式,并且大多数还包括事件前和事件后回调功能
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.