連接式:javascript
<a href="javascript:history.go(-1)">返回上一步</a>java
<a href="<%=Request.ServerVariables("HTTP_REFERER")%>">返回上一步</a>jsp
按鈕式:url
<INPUT name="pclog" type="button" value="GO" onClick="location.href=’http://www.ekesn.com/‘">spa
直接跳轉式:orm
<script>window.location.href=’http://www.ekesn.com‘;</script>htm
JS跳轉頁面參考代碼ip
第一種:
<script language="javascript" type="text/javascript">
window.location.href="login.jsp?backurl="+window.location.href;
</script>
第二種:
<script language="javascript">
alert("返回");
window.history.back(-1);
</script>
第三種:
<script language="javascript">
window.navigate("top.jsp");
</script>
第四種:
<script language="JavaScript">
self.location=’top.htm’;
</script>
第五種:
<script language="javascript">
alert("非法訪問!");
top.location=’xx.jsp’;
</script>it