1
swal({title: "Sure ?", text: "Your form will be submitted", confirmButtonText: "Ok",
showConfirmButton:true, showCancelButton: true, cancelButtonText: "No", type:"warning", closeOnConfirm: false,
closeOnCancel: false },
function(isConfirm) {
if (isConfirm) {
swal({
title: 'Confirm!',
text: 'Successfully Submitted!',
type: 'success'
}, function() {
console.log("Inside Function");
$scope.applyleave("ok");
});
} else {
swal("Cancelled", "Your application not submitted :)", "error");
return false;
}
});
碼流應繼續只在點擊確定,但它的執行沒有任何用戶執行Sweetalert不是等待用戶的動作,並用代碼進入
我提交表單從HTML這個JS,但我想阻止確認框並等待用戶操作並允許下面的代碼只在用戶按下時執行Ok