首页 > 解决方案 > 在 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');
        },

标签: jquery

解决方案


解决方案很简单,我不知道为什么它不能更早地工作。

<strong><?= _("I hereby accept the <a href='#' target='_blank'><u>terms and conditions</u></a> and have read the privacy statement.") ?></strong>

推荐阅读