一个ASP随机跳转页面
<%@LANGUAGE=“VBSCRIPT“ CODEPAGE=“65001“%><%Response.ContentType = “text/vnd.wap.wml; charset=utf-8“%><?xml version=“1.0“ encoding=“utf-8“?>
<!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.1//EN“ “http://www.wapforum.org/DTD/wml_1.1.xml“>
<wml>
<head><meta http-equiv=‘Cache-Control‘ content=‘no-cache‘/>
</head>
<%
dim shuzu(5) ‘定义数组,并设置转向哪个页面,要跳几个就写几,20就把5改成20
shuzu(0)=“http://***“ ‘设置域名即可,后面不用加/,端口直接加就好了比如http://***:8080
shuzu(1)=“http://***“
shuzu(2)=“http://***“
shuzu(3)=“http://wapvy.cn“
shuzu(4)=“http://***“
shuzu(5)=“http://***“ ‘如果上面是20那么就一直到shuzu(20)
dim i ‘获取到有几个转向地址
i=ubound(shuzu)+1
randomize
dim change
change=int(i*rnd()) ‘获取到随机数
dim urlname,addressname,url
urlname=Request.ServerVariables(“QUERY_STRING“)
addressname=Request.ServerVariables(“SCRIPT_NAME“)
if urlname<>““ Then
addressname=addressname+“?“ +urlname
End If
url=shuzu(change)&addressname
%>
<card title=“欢迎光临“ ontimer=“<%=url%>“>
<timer value=“1“/>
<p>
请稍后<br/>
<a href=“<%=url%>“>手动进入</a>
</p></card></wml>
发表评论