关于ASP编写随机连接跳转

来源:百度知道 编辑:UC知道 时间:2024/06/19 00:45:04
<%
function encodestr(str)
str=trim(str)
if IsNull(str) then exit function
str=replace(str,"&","&")
str=replace(str,"<","<")
str=replace(str,">",">")
str=replace(str,"$","$$")
str=replace(str,Chr(13),"")
str=replace(str,"'","'")
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.pattern="(\[img\])(.[^\[]*)(\[\/img\])"
str= re.Replace(str,"<img src=""$2"" alt=''/>")
re.pattern="(\[url\])(.[^\[]*)(\[\/url\])"
str= re.Replace(str,"<a href=""$2"" >$2</a>")
re.pattern="(\[url=(.[^\]]*)\])(.[^\[]*)(\[\/url\])"
str= re.Replace(str,"<a href=""$2""

html里有这样一个写法,可以自动跳转。
<META HTTP-EQUIV='REFRESH' CONTENT='1; URL=XXX.asp'>

在asp里可以这样写:
response.Write("<META HTTP-EQUIV='REFRESH' CONTENT='1; URL=XXX.asp'>")

其中Content是指几秒后跳转的秒数
URL是跳转的页面地址,如index.asp

这样解释可以吗,如果可以的话,就尽快结束问题吧。