我想在成功的Ajax调用和页面重新加载后立即显示一条Bootstrap警报消息
success: function(res) {
window.location.reload();
$('#success').html('<div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Row Deleted Successfuly</div>');
},
success: function(res) {
//this will display your success message
$('#success').html('<div class="alert alert-success alert-dismissible" role="alert"> <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Row Deleted Successfuly</div>');
//then
setTimeout(function(){ window.location.reload(); },5000); //reload a page after 5 seconds
},