$.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發送的數據呢
教一下后臺如何去接收前端通過ajax發送的數據呢
葉無道瘋人院
2019-05-09 16:55:52