Joke Collection Website - Blessing messages - Ajax verification code problem. The verification code has been verified in the background through ajax. When the verification code is wrong, the submission will be successful. How to solve it?
Ajax verification code problem. The verification code has been verified in the background through ajax. When the verification code is wrong, the submission will be successful. How to solve it?
Use type="button" and give onclick ="ajax method", verification success lies in
success:function(json)//Trigger function when the request is successful
{
var obj= json.message;
if(obj==0){
alert('Verification code error');
return false;
< p> }else{
alert('Verification code is correct');
document.form.submit();//Add form submission< /p>
}
- Previous article:2023 summer vacation start time in Shandong
- Next article:Samsung mobile phone short message sending problem? Try these solutions!
- Related articles
- How to report and complain about the increase in vegetable prices during the epidemic in Chongqing (telephone number for reporting the increase in vegetable prices during the epidemic)
- How to find the entrance of Qingdao Blue Valley Half Marathon?
- nova8, nova8Pro upgrade Hongmeng system internal testing method
- How to integrate when the available balance of salary indicators is insufficient?
- Will Alipay call back after buying insurance?
- Xuzhou CDC issued an urgent reminder: Be careful to go to Qingdao.
- Today, I received a text message saying that my Alipay has recently logged in many different places, asking me to verify my real name for the second time or freeze my account.
- Why is there no information when I swipe my credit card?
- Happy Mother's Day, Mom.
- Jinzhou Travel Policy