jquery - 在 jQuery 中包含超链接
问题描述
如何在以下 jQuery 函数中包含“条款和条件”的超链接:
create: function () {
var pane = $(this).dialog("widget").find(".ui-dialog-buttonpane")
$("<label class='terms-conditions'><input id='terms-conditions' type='checkbox' onchange='dialogDisable()'/> " +
"<strong><?= _("I hereby accept the terms and conditions and have read the privacy statement.") ?></strong></label>").prependTo(pane);
$('#terms-conditions').css('position', 'center');
},
解决方案
解决方案很简单,我不知道为什么它不能更早地工作。
<strong><?= _("I hereby accept the <a href='#' target='_blank'><u>terms and conditions</u></a> and have read the privacy statement.") ?></strong>
推荐阅读
- google-cloud-platform - Google Cloud Run 如何处理异步调用?
- python - 如何使用 Python 按列对不同的 csv 文件进行排序并将它们合并为一个?
- javascript - 在 2 个 div 的碰撞中,使用 Javascript 在其中一个中添加一个类
- r - R:将日期从每天转换为每周并绘制它们
- javascript - 如何在 Firebase 存储参考中使用变量
- c - 初始化一个包含 20 个元素的数组以稍后更新值,但数组的某些元素在 C 中以非零开头?这是为什么?
- python - 删除数据集中字符串的结尾(python)
- javascript - 如何挂载像 codepen 这样的 Vue 3 CLI 项目
- c# - 试图获得骰子卷的随机数
- php - 带有 MySQL 驱动程序的 Laravel 8 原子锁根据 Web 浏览器执行不同的操作