var username = $("#id").val(); var user={"userAccount":username,"userPassword":"1233","platform":"100","deviceFigure":"121212121"}; $.ajax({ url : "/fras/api/user/first/login",//首次的登陆请求地址 type : "post",//请求方式 data : user, success : function(jdata) { if(jdata.data == "Y" ){ alert("登陆成功,正在启动设备!!"); } if(jdata.data == "N"){ alert("账号有误,请重新输入!"); } } }); }