search

Home  >  Q&A  >  body text

About ajax in JQ

When I use jQ's ajax and post to submit data to compare with the verification code created by php and trigger the event, the data comparison and the addition of HTML element tags are effective, but when the verification succeeds or fails, the mouse can no longer be moved in. The input box and partial refresh PHP verification code can only refresh the browser. The code is as follows:

$("#yzm").change(function (event) {
var yzm_num = $(this) .val();
$.post("chk_code.php",{yzm:yzm_num},function (msg) {
$("#code").after(msg);
}) ;
});

In addition, if there is no verification with the Php verification code, but only verification with an array in the database, there will be no problem that the mouse cannot enter the input box.

水东水南水东水南2223 days ago1054

reply all(2)I'll reply

  • 水东水南

    水东水南2018-10-29 19:51:51

    The problem was found because the positioning element occupied other elements, leading to the above reasons. Haha, every bug is a small improvement. Now you can simulate user form submission and simulate interaction with PHP data!

    reply
    0
  • 水东水南

    水东水南2018-10-29 18:34:55

    As shown above: No matter whether the verification is successful or failed, the mouse cannot enter the input box, and partial refresh of the PHP verification code does not work. The browser must be refreshed. Other user name verifications, etc. are all fine, just verify with the PHP verification code. This kind of BUG will happen, please ask the boss for help.

    reply
    0
  • Cancelreply