我正在使用此 ajax 代码提交表单
<script type="text/javascript">
$(document).ready(function(){
$("#ticketupdate_message").hide();
$("#ticketupdate_please_wait_box").hide();
$("#ticket_update").submit(function(e){
$("#ticketupdate_message").hide();
$("#ticketupdate_please_wait_box").show();
e.preventDefault();
dataString=$("#ticket_update").serialize();
$.ajax({
type: "POST",
url: "reviewtickets_history.php?seq=<?php echo $_GET["seq"]; ?>",
cache: false,
data: dataString,
success: function(res){
$("#ticketupdate_please_wait_box").hide();
$("#ticketupdate_message").html(res);
$('#ticketupdate_message').fadeIn('slow');
$('.overlay').fadeOut();
if(res.indexOf("success")!=-1)
{
window.location.href = res.substr(8);
}
else
{
$("#ticket_update")[0].reset();
}
}
});
});
});
</script>
如果成功,如何添加页面刷新?
最佳答案
关于javascript - ajax页面刷新表单提交成功,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21025952/