Home > Back-end > The ajax request, not an error but can't get into the controller method
The ajax request, not an error but can't get into the controller method
Time:09-22
/* * * message authentication code * @ type {string} */ Var SMS=""; $(" # "BTN). Click (function () { Var phone=$(" # phone "). Val (); If (phone! { ="")$. Ajax ({ Type: "GET", URL: "/smscode sendsms/logged",//send the request admin/core/arm/controller \ SmsCodeController system/core/arm/controller/sendsms DataType: "json", Data: { SmsType: "1004", Phone: phone }, Success: the function (data) { SMS=data; } }); } else { Alert (" please enter the phone number "); return false; } }); $(" # lo "). Click (function () { Var code=$(" # code "). Val (); If (code=="") { Alert (" please enter the verification code "); } else { If (SMS==code) { Window. The location. Href="https://bbs.csdn.net/topics/success.jsp"; } else { Alert (" verification code error "); } ; } ; });
});
A simple text message validation of ajax, but after I set breakpoints to the first arrow directly to the second arrow, just skip the middle excuse me where is the problem
CodePudding user response:
Controller over there and see what has to print, look at the controller code
CodePudding user response:
The browser console, may not support the get method