1 回答

TA贡献1812条经验 获得超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 关注
- 106 浏览
添加回答
举报