$.ajax({ type:"post", url:"/servlet/js.do", dataType:"json", data:"{username:${'#username'}.val(),password:${'#password'}.val()}", contentType:"application/x-www-form-urlencoded;charset=utf-8", success:function (data) { console.log(data); }, error:function (e) { console.log(e); } });
是了很久,请教一下后台如何去接收前端通过ajax发送的数据呢
相关分类