【发布时间】:2017-03-01 14:42:29
【问题描述】:
如果一个复选框仅第一次被选中,我想执行一个函数。有可能吗?
通过使用:
this.on('buuttonCheckBox:set', function(){
//do the work
})
或
this.on('buuttonCheckBox:change', function(){
//do the work
})
或使用 Jquery:
$('#checkbox1').click(function() {
if (!$(this).is(':checked')) {
return confirm("Are you sure?");
}
});
【问题讨论】:
标签: javascript jquery checkbox