Since you use the ajax, then in success, manual replace HTML content, Because ajax is asynchronous, also is the equivalent of, You run the page and asynchronous operation controler, is not a So cause your ajax triggered the background, but the page hasn't changed,
CodePudding user response:
But now a more suitable scheme, Is to use vue such as front desk framework to two-way binding, They are in order to solve this problem,