如何添加到按钮 "jQuery confirm" 以确认工作
How to add to a button "jQuery confirm" for confirmation to work
使用 module 但在单击“是”后没有发送任何内容。请解释一下。
<form class="zaeb" action="" method="post" id="kek">
<input type="hidden" name="type" value="<?php echo $plan->id; ?>">
<button id="b12<?php echo $plan->id; ?>" type="submit" class="example2 btn btn-primary btn-lg btn-block" name="buy"><b>CLICK HERE TO PURCHASE</b></button>
jQuery:
$('button.example2').confirm({
title: 'Confirm!',
content: 'Simple confirm!',
buttons: {
confirm: function () {
$.alert('Confirmed!');
},
cancel: function () {
$.alert('Canceled!');
},
somethingElse: {
text: 'Something else',
btnClass: 'btn-blue',
keys: ['enter', 'shift'],
action: function(){
$.alert('Something else?');
}
}
}
});
想做个漂亮的造型
confirm 功能只提醒一条确认消息,你应该改变
confirm: function () {
$.alert('Confirmed!');
},
至
confirm: function () {
document.getElementById("kek").submit();
$.alert('Confirmed!'); // may need to remove this
},
使用 module 但在单击“是”后没有发送任何内容。请解释一下。
<form class="zaeb" action="" method="post" id="kek">
<input type="hidden" name="type" value="<?php echo $plan->id; ?>">
<button id="b12<?php echo $plan->id; ?>" type="submit" class="example2 btn btn-primary btn-lg btn-block" name="buy"><b>CLICK HERE TO PURCHASE</b></button>
jQuery:
$('button.example2').confirm({
title: 'Confirm!',
content: 'Simple confirm!',
buttons: {
confirm: function () {
$.alert('Confirmed!');
},
cancel: function () {
$.alert('Canceled!');
},
somethingElse: {
text: 'Something else',
btnClass: 'btn-blue',
keys: ['enter', 'shift'],
action: function(){
$.alert('Something else?');
}
}
}
});
想做个漂亮的造型
confirm 功能只提醒一条确认消息,你应该改变
confirm: function () {
$.alert('Confirmed!');
},
至
confirm: function () {
document.getElementById("kek").submit();
$.alert('Confirmed!'); // may need to remove this
},