如果仅在首次选中复选框时才想执行某个功能。可能吗?如果仅在第一次选中复选框,则会显示一条消息
使用:
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?");
}
});