1 回答

TA貢獻1812條經(jīng)驗 獲得超5個贊
有兩個錯誤,
1) 替換$('#exampleModal').hide();為$('#exampleModalLong').hide();
2)你不是json從你的select.php
在select.php添加這個
if (mysqli_num_rows($res) > 0) {
$respose = array('status'=>'1');//1 for success
echo json_encode($respose );
} else {
$respose = array('status'=>'0');//0 for fail
echo json_encode($respose );
}
mysqli_close($link);
在 Ajax 中:添加這個
success:function(data) {
if(data.status == '1'){
$("#exampleModalLong").removeClass("in");
$(".modal-backdrop").remove();
$('body').removeClass('modal-open');
$('body').css('padding-right', '');
$("#exampleModalLong").hide();
}
},
- 1 回答
- 0 關(guān)注
- 123 瀏覽
添加回答
舉報