javascript - After the form ajax is submitted, it jumps, and the mobile phone presses return to enter the form page again!!
怪我咯
怪我咯 2017-07-05 10:44:07
0
4
886

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...

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all (4)
代言

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

    漂亮男人

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

      我想大声告诉你

      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.

        刘奇

        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

          Latest Downloads
          More>
          Web Effects
          Website Source Code
          Website Materials
          Front End Template
          About us Disclaimer Sitemap
          php.cn:Public welfare online PHP training,Help PHP learners grow quickly!