1.如果页面不需要返回,页面跳转用window.location.replace() 2.如果页面需要返回,页面跳转用window.location,href = "跳转url",返回上一个页面用window.history.go(-1)
注意点: 返回尽量用window.history.go(-1)
页面来回跳转
原文:https://www.cnblogs.com/longma-ling/p/14794913.html