为了账号安全,请及时绑定邮箱和手机立即绑定

jq的ajax传值问题?

jq的ajax传值问题?

qq_伊璐_0 2017-09-28 20:50:13
使用post传值到a.html,注册提交后浏览器返回200,get,url=http://localhost:8080/?name=haha&pwd=123,ajax的成功和错误都没有执行,按钮点击那步执行了,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);         }     }); })
查看完整描述

2 回答

?
qq_伊璐_0

TA贡献2条经验 获得超13个赞

打错了a.php,是个不存在的文件

查看完整回答
反对 回复 2017-09-28
?
橋本奈奈未

TA贡献436条经验 获得超108个赞

提交到html是什么鬼?还有这种操作?

查看完整回答
反对 回复 2017-09-28
  • 2 回答
  • 0 关注
  • 1950 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信