Ajax请求成功后页面跳转

通过location.href,进行页面的跳转

<input id="title" type="text" placeholder="请输入标题">
<input id="input" type="button" value="发布">
        $("#input").click(function () {
            $.post({
                url: "/editormd",
                data: {
                    title: $("#title").val(),
                },
                success: function () {
                    location.href="/";
                }
            });
发布了459 篇原创文章 · 获赞 298 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/HeZhiYing_/article/details/104944047