俄语在线网站建设,柳市网站制作,建站设计网站,能从源代码黑进网站修改数据吗从a页面b页面c页面#xff0c;当前在c页面#xff0c;执行某方法后可以如同按了浏览器后退键一样返回b页面 若项目使用vue-router#xff0c;this.$router.go(-1)可以回到上一页
this.$router.back()
window.history.go(-1)
区别
go(-1): 原页面表单中的内容会丢… 从a页面b页面c页面当前在c页面执行某方法后可以如同按了浏览器后退键一样返回b页面 若项目使用vue-routerthis.$router.go(-1)可以回到上一页
this.$router.back()
window.history.go(-1)
区别
go(-1): 原页面表单中的内容会丢失1. this.$router.go(-1)后退刷新2. this.$router.go(0)刷新3. this.$router.go(1)前进----back(): 原页表表单中的内容会保留1. this.$router.back()后退 2. this.$router.back(0)刷新3. this.$router.back(1)前进
history.go(-1)是返回浏览器的上一页而由于Vue是单页面应用
有的浏览器对于hash变更不认为是两个不同的页面在hash模式下就不会跳回浏览器上一页