search

Home  >  Q&A  >  body text

node.js+express 怎么在路由中刷新当前页

黄舟黄舟2875 days ago423

reply all(4)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 16:13:52

    https://github.com/FengShangW...
    A simple login registration and chat application (node ​​+ express + mongodb), you can refer to

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 16:13:52

    res.redirect(xx)

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 16:13:52

    The simplest thing is to add the onsubmit parameter to the form and submit it asynchronously

    <script>
        function PostData() {
            $.ajax({
                type: "POST",
                url: "post.go",
                data : "",
                success: function(msg) {
                }
            });
            return false;
        }
    </script>
    <form onsubmit="return PostData()">
        <input type="text" value="">
        <input type="submit">
    </form>
    

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 16:13:52

    You can execute location.reload() after a successful request in ajax

    reply
    0
  • Cancelreply