js实现返回上一url

来源:互联网 发布:php implode 什么意思 编辑:程序博客网 时间:2024/06/06 03:56

testa.html跳转到testb.html  后。点击页面上的一个按钮,让能够返回到testa.html页面

testa.html

<html><body><a href="testb.html" target="_self">goto page b</a></body></html>

testb.html

<html><body><script>function backTo() {window.history.back(-1);}</script><input type="button" value="back" onclick="backTo();"/></body></html>


window.history.back(-1);



0 0
原创粉丝点击