<%
count=request("id")
%>
<script>
function loadurl()
{
<%if count<10 then%>
location.href="test.asp?id="+<%=count+1%>;
alert(<%=count+1%>);
<%end if%>
}
setTimeout("loadurl()",500)
</script>
count=request("id")
%>
<script>
function loadurl()
{
<%if count<10 then%>
location.href="test.asp?id="+<%=count+1%>;
alert(<%=count+1%>);
<%end if%>
}
setTimeout("loadurl()",500)
</script>
count=request("id")
%>
<script>
function loadurl()
{
<%if count<10 then%>
location.href="test.asp?id="+<%=count+1%>;
alert(<%=count+1%>);
<%end if%>
}
setTimeout("loadurl()",500)
</script>
count=request("id")
%>
<script>
function loadurl()
{
<%if count<10 then%>
location.href="test.asp?id="+<%=count+1%>;
alert(<%=count+1%>);
<%end if%>
}
setTimeout("loadurl()",500)
</script>忘了,一定要存为test.asp
<script id=clientEventHandlersJS language=javascript>
<!--
var count=0;
var timer;
window.onload =function () {
if(getcookie("count")!="")
count = getcookie("count");
if(count<10){
timer= window.setInterval("window.document.location.reload()",500)
count++;
setcookie("count",count);
}
else
{
alert("执行了"+count+"次,将停止");
window.clearInterval(timer);
}
}function getcookie(sName)
{
var aCookie = document.cookie.split("; ");
for (var i=0; i < aCookie.length; i++)
{
var aCrumb = aCookie[i].split("=");
if (sName == aCrumb[0])
return unescape(aCrumb[1]);
}
return null;
}function setcookie(sName, sValue)
{
date = new Date();
date.setTime(date.getTime()+1000); //1 second
document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString();
}//-->
</script>
{
for(var i=0;i<10;i++)
{
window.location.reload();
}
}
{
for(var i=0;i<10;i++)
{
window.location.href=hrefPage;
}
}
private void Page_Load(object sender, System.EventArgs e)
{
if (Request.QueryString["Id"] == null)
Response.Redirect("s2.aspx?Id=1");
else
{
if(Int32.Parse(Request.QueryString["Id"])<10)
Response.Redirect("s2.aspx?Id="+(Int32.Parse(Request.QueryString["Id"])+1).ToString());
}
}