【发布时间】:2019-02-18 15:01:38
【问题描述】:
为什么下面的代码会返回错误:
<script type="text/javascript">
$(document).ready(function () {
$("#chkIssueCredit").change(function () {
if (!$(this).prop('checked')) {
bootbox.confirm("Are you sure you do not want to issue a credit? Please confirm."), function (result) {
if (result) {
$(this).prop('checked', true);
}
}
return false;
//if (!confirm("Are you sure you do not want to issue a credit? Please confirm.")) {
// $(this).prop('checked', true);
//};
};
});
});
</script>
【问题讨论】:
-
代码会为您产生什么错误?请edit问题删除重复,并添加错误消息。如果可能,通过添加适当的 html 并将其转换为可执行的 sn-p 将问题转换为 minimal reproducible example。
标签: jquery bootstrap-4 bootbox