asp重定向页面的方法总结


  本文标签:asp重定向页面的方法总结

返回上一页,一般用在判断信息提交是否完全之后<%
******************************
函数:GoBack()
参数:无
作者:阿里西西
日期:2007/7/13
描述:返回上一页,一般用在判断信息提交是否完全之后
示例:<%call GoBack()%>
******************************
Sub GoBack()
Response.write ("<script>history.go(-1)</script>")
End Sub 
%>
重定向到另外的链接
<%
******************************
函数:Go(url)
参数:url,相对或绝对路径及网址
作者:阿里西西
日期:2007/7/13
描述:重定向到另外的链接
示例:<%call Go(http://www.alixixi.com)%>
******************************
Sub Go(url)
Response.write ("<script>location.href(" & url & ")</script>")
End Sub 
%>
指定秒数重定向另外的连接
<%
******************************
函数:GoPage(url,s)
参数:url,相对或绝对路径及网址;s,以秒为单位的时间后跳转
作者:阿里西西
日期:2007/7/13
描述:指定秒数重定向另外的连接
示例:<%call GoPage("http://www.alixixi.com",3)%>
******************************
sub GoPage(url,s)
s=s*1000
Response.Write "<SCRIPT LANGUAGE=javascript>"
Response.Write "window.setTimeout("&chr(34)&"window.navigate("&url&")"&chr(34)&","&s&")"
Response.Write "</script>"
end sub 
%>