0
成功插入日期後,我想重定向到另一個JSP頁面。通過AJAX成功插入數據後重定向到另一個頁面
$.ajax({
type: "post",
url: "register.jsp",
data: datastring,
success:function(){
window.location.href = "nextPage.jsp";
}
但我不能重定向到另一個頁面(nextPage.jsp),但數據插入到數據庫是成功的。如何重定向到 另一頁?
我也試過
success:function(){
$("divid").load("nextPage.jsp") }
,但是這也不能正常工作。的