ajax執(zhí)行成功后可以跳轉(zhuǎn)到另一個(gè)頁面嗎
1 回答

www說
TA貢獻(xiàn)1775條經(jīng)驗(yàn) 獲得超8個(gè)贊
是可以的。
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="跳轉(zhuǎn)的url,后邊也可以拼接點(diǎn)data中數(shù)據(jù)作為參數(shù)"; } }); |
1 | 如果是需要跳轉(zhuǎn)到另外的頁面,也可以用window.open(url); |
- 1 回答
- 0 關(guān)注
- 2553 瀏覽
添加回答
舉報(bào)
0/150
提交
取消