search

Home  >  Q&A  >  body text

javascript - After the form ajax is submitted, it jumps, and the mobile phone presses return to enter the form page again!!

After the ajax form is submitted, it jumps, and the mobile phone presses return to enter the form page again!! If the submission is successful, the go(-1) page does not refresh, I don’t know what to do...

怪我咯怪我咯2703 days ago956

reply all(4)I'll reply

  • 代言

    代言2017-07-05 10:46:07

    There is a method:
    lcoalhost.replace()

    : Replace the current page with the new url


    In this way, if you press the return key, you will not return to the current page

    reply
    0
  • 漂亮男人

    漂亮男人2017-07-05 10:46:07

    Since you want to jump, why do you need AJAX submission? . ? I don’t quite understand

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-07-05 10:46:07

    First of all, you should use replace() to replace the history record of the form page after logging in as mentioned above. Secondly, your routing should determine whether your application is logged in or not. Before each jump, you need to check your login Status check.

    reply
    0
  • 怪我咯

    怪我咯2017-07-05 10:46:07

    JS returns such as lcoalhost.back() on mobile phones may cause jump loop problems, especially in webview, the effect is inconsistent with the system's return key,

    Emphasis: Different Androids may be different, such as some models of Huawei, Samsung, and Xiaomi,

    The project team has used Hbuilder’s 5+ SDK. If you have done streaming applications such as webview, you can try it

    reply
    0
  • Cancelreply