简体   繁体   English

如何在引导对话框对话框中添加href链接

[英]How to add href link in bootbox dialog message

Here is my jQuery code to the bootbox dialog box. 这是我的bootbox对话框的jQuery代码。

bootbox.dialog({ 
message: 'Message has been generated.<br><a href=<?php echo $site_url;?>/force_download.php?file_name=../folder_path/'+msg_split[1]+'.pdf>Click Here to download label</a> <br><b>Currently generated Lable is -&nbsp;<font color=red>'+msg_split[1]+'</font></b>',
title: 'Response',
buttons: {
warning: {
      label: "Ok",
      className: "btn-success",
         callback: function() {
         flushWarehouseInformation();
      }
    }
 }  
});

But for me href link is not working properly. 但对我来说,href链接无法正常工作。 How can I achieve this? 我该如何实现? any help would be greatly appreciated. 任何帮助将不胜感激。

You need to properly wrap your URL in the quotes. 您需要将URL正确地括在引号中。 Note the start and end of single quotes and double quotes. 请注意单引号和双引号的开头和结尾。

message: 'Message has been generated.<br><a href="' + <?php echo $site_url;?> + '/force_download.php?file_name=../folder_path/' + msg_split[1] + '.pdf">Click Here to download label</a><br /><b>Currently generated Lable is -&nbsp;<font color="red">' + msg_split[1] + '</font></b>',

这样尝试...

<a href="<?php echo $site_url;?>/force_download.php?file_name=../folder_path/'+msg_split[1]+'.pdf">Click Here to download label</a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM