欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Ajax post請(qǐng)求跳轉(zhuǎn)頁(yè)面

 更新時(shí)間:2016年12月30日 13:48:18   作者:荒年-yang  
這篇文章主要介紹了Ajax post請(qǐng)求跳轉(zhuǎn)頁(yè)面的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下

最近因?yàn)楣拘枨?,需要ajax post請(qǐng)求并跳轉(zhuǎn)界面,網(wǎng)上搜了一下資料,差不多都是用window.location.href來(lái)處理,但是在請(qǐng)求頁(yè)面的地址欄中會(huì)暴露請(qǐng)求的參數(shù),這是不安全的。

$.post(
url,
{method:"regist",userName:$nameEle.val(),email:$emailEle.val(),password:$passwordEle.val()},
function(data) {
//注冊(cè)成功頁(yè)面跳轉(zhuǎn),
window.location.href ="../yiliaoqixie/login.html?name="+$nameEle.val();
}
); 

因此,只能想到了通過(guò)form表單來(lái)進(jìn)行post提交。

<form method="post" action="action" id="fm">
</form>
$.post(
url,
{method:"regist",userName:$nameEle.val(),email:$emailEle.val(),password:$passwordEle.val()},
function(data) {
//注冊(cè)成功頁(yè)面跳轉(zhuǎn),
  var fm=document.getElementById("fm");
  fm.submit();
}
); 

以上所述是小編給大家介紹的Ajax post請(qǐng)求跳轉(zhuǎn)頁(yè)面,希望對(duì)大家有所幫助,如果大家有任何疑問(wèn)請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!

相關(guān)文章

最新評(píng)論