![](/img/trans.png)
[英]Go back to the Previous URL and replace the current URL from the Navigation History
[英]Automatic “go back” to previous url
我想重定向到我以前所在的URL。
我使用了这个<meta http-equiv="refresh" content="2; url=javascript:history.back();">
但是它不起作用,它给了我这个错误:
redirectrequireditems.html:14 Refused to refresh http://localhost/Test.com/redirectrequireditems.html to a javascript: URL
第14行是<meta http-equiv="refresh" content="2; url=javascript:history.back();">
有什么建议么?
不知道我们是否可以通过META标签做到这一点,我有以下使用JavaScript的解决方案:
<script language="JavaScript" type="text/javascript">
setTimeout("window.history.go(-1)",2000);
</script>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.