select change 加confirm
2019-06-13 本文已影响0人
ifree321
$('.group-role-form select').focus(function() {
prev_val = $(this).val();
}).change(function(){
if (confirm('确认执行本操作么?')) {
$(this).closest('form').submit();
}else{
$(this).val(prev_val);
return false;
}
});