使用post傳值到a.html,注冊提交后瀏覽器返回200,get,url=http://localhost:8080/?name=haha&pwd=123,ajax的成功和錯誤都沒有執(zhí)行,按鈕點擊那步執(zhí)行了,ajax里面不知道出了什么問題?,求大神們解惑。<div class="loginBox" id="register_Box"> ????<form method="">????????<input type="text" name="name" placeholder="用戶名">????????<input type="password" name="pwd" placeholder="密碼"> ????????<button>注冊</button> ????</form> </div>$register_Box.find('button').on('click',function(){ ????$.ajax({???????? type:"post",???????? url:"a.html",???????? dataType:"json",???????? data:{???????? ???? username:$register_Box.find('[name="name"]').val(),???????????? pwd:$register_Box.find('[name="pwd"]').val()???????? },? ????????????? success:function(result){???????????? console.log(result);???????? },???????? error:function(e){???????? ???? console.log(e);???????? }?????}); })
jq的ajax傳值問題?
qq_伊璐_0
2017-09-28 20:50:13