function modaldemo() {
$.ajax({
url: 'modaldemo',
type: 'post',
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
data: {
a: 1
},
dataType: 'json',
success: function(res) {
alert(res);
}
});
$("#modal-demo").modal("show")
$("#modal-demoreg").modal("hide")
}
ajax 基本格式
关注
打赏