gpt4 book ai didi

javascript - 如何在引导框对话框消息中添加 href 链接

转载 作者:行者123 更新时间:2023-11-28 17:38:25 25 4
gpt4 key购买 nike

这是我的 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();
}
}
}
});

但对我来说,href 链接无法正常工作。我怎样才能实现这个目标?任何帮助将不胜感激。

最佳答案

您需要将 URL 正确地括在引号中。请注意单引号和双引号的开头和结尾。

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>',

关于javascript - 如何在引导框对话框消息中添加 href 链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48564643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com