1.先在页面上增加一个返回按钮,并用a标签来定义,点击事件来写
<strong class="title"> <a href="JavaScript:" @click = returnPrevious()>后退</a></strong>
2.接下来写js代码:
returnPrevious(){
window.history.back(-1);
},
同理
前进按钮:
html:<strong class="title"> <a href="JavaScript:" @click = returnNext()>前进</a></strong>
js: returnPrevious(){
window.history.back(-1);
},