后台返回的html代码片段,需要插入html标签中,而返回的整个html文档,则需要重写整个页面. 解决方法: 需要一个中转页面,用document.write()方法重写整个页面: // POST任意内容并跳转 function StandardPost(html) { localStorage.removeItem('callbackHTML'); localStorage.setItem('callbackHTML',html); window.location.href = window