ajax執行成功后可以跳轉到另一個頁面嗎
1 回答

www說
TA貢獻1775條經驗 獲得超8個贊
是可以的。
1 2 3 4 5 6 7 8 9 10 | 例如: $.ajax({ type:"post", url:url, data:{xxx:xx}, dataType: "json", success : function(data){ window.location.href="跳轉的url,后邊也可以拼接點data中數據作為參數"; } }); |
1 | 如果是需要跳轉到另外的頁面,也可以用window.open(url); |
- 1 回答
- 0 關注
- 2556 瀏覽
添加回答
舉報
0/150
提交
取消