通過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="/";
}
});