javascript - 如何在 JavaScript 确认()对话框中获取 HTML 链接?

标签 javascript html confirm

我需要在确认对话框中添加一个 HTML href 链接,但我得到的是 href 的文本而不是 HTML 标记)。

return confirm("Changes to your financial details may affect your GST or tax status for items already for sale via Momento Shop. Please read and confirm the Momento Shop<a target='_blank' href='/pages/terms_print'>terms and conditions.</a>")

上述代码的输出是:

Changes to your financial details may affect your GST or tax 
status for items already for sale via Momento Shop. Please 
read and confirm the Momento Shop terms and conditions.

但我需要条款和条件成为链接(可以点击)。

最佳答案

您无法在内置确认对话框中执行此操作。

看看一些可用的 UI 库。 jQuery UI's dialog component看起来很合适。

关于javascript - 如何在 JavaScript 确认()对话框中获取 HTML 链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7200043/

相关文章:

css - 如何居中div

javascript - Vue.js Battle - 确认框覆盖重置功能

javascript - 在弹出确认对话框之前执行某些操作

javascript - 弹出窗口未在 codeigniter 中打开

javascript - 发出请求时 GCF 超时

javascript - 元素排序后工具提示停止工作

javascript - 您可以绑定(bind) .click() 以便它在 onclick 之前触发吗?

javascript - 如何为按键设置动画?

javascript - 迷你任务流程栏

c# - 无法使用 HttpWebRequest/HttpWebResponse 下载 html 字符串