![](/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.