---
title: "JS重定向原网页"
author: "cyotun"
date: "2013-08-08T19:55:59Z"
tags: []
categories: ["Web前端"]
slug: "js"
draft: false
lastmod: "2013-08-08T19:55:59Z"
id: 1922210
url: "https://cyotun.iteye.com/blog/1922210"
---

如果能保证该页不会被非法访问.用
   
```javascript
history.back(-1);
```



或者你可以先判断该页的来源:
比如你原来的页面叫abc.aspx.



```javascript

if(document.referrer.indexOf("abc.aspx")>0){
   location.href=document.referrer;
}

```