<%
for i=1 to 10000
...
asp code
...
%>
<script language="vbscript">
res=msgbox("是否退出循环?",4)
if res=6 then
%>
exit for
<%
end if
</script>
<%
...
asp code
...
next
%>
好象上面的没有达到你的要求。
下面是改过的 test.asp 的代码:
<%
for i=1 to 100
if Request("number")<>"" and i<Clng(Request("number")) then
else
if i=10 then
%>
<script language=javascript>
if (confirm("ooo"))
{
location.href ="test.asp?number=<%=i%>"
}
else
{
location.href ="test.asp?number=<%=i+1%>"
}
</script>
<%
end if
Response.Write i
end if
next
%>
下面是 test.asp 的代码:
<%
for i=1 to 100
if Clng(Request("number"))>100 then exit for
if Request("number")<>"" and i<=Clng(Request("number")) then
else
if i=10 then
%>
<script language=javascript>
if (confirm("ooo"))
{
location.href ="test.asp?number=<%=i%>"
}
else
{
location.href ="test.asp?number=200"
}
</script>
<%
end if
Response.Write i
end if
next
%>
看看上面这段代码能否满足你的要求,如果有更高的要求,请与发Email给我。angle2001@263.net
<%
for i=1 to 100
if Clng(Request("number"))>100 then exit for
if Request("number")<>"" and i<=Clng(Request("number")) then
else
if i=10 then
%>
<script language=javascript>
if (confirm("ooo"))
{
location.href ="test.asp?number=<%=i%>"
}
else
{
location.href ="test.asp?number=200"
}
</script>
<%
end if
Response.Write i
end if
next
%>
看看上面这段代码能否满足你的要求,如果有更高的要求,请与发Email给我。angle2001@263.net