简单问题100分

我需要一个asp脚本。
功能就是倒计时30秒,然后转到另一个网页。
请给适当的说明。
---------------------------------------------------------------

用循环,循环体是一个时间相减函数
---------------------------------------------------------------

Sub delaySecond(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount

 1<delayseconds +="" 1="" <="" if="" sec1=""> Sec2 Then   
 2Sec2 = Second(Time())   
 3SecCount = SecCount + 1   
 4End If   
 5Wend   
 6End Sub   
 7  
 8delaySecond(3)//延迟3秒   
 9你根据自己的情况改   
10\---------------------------------------------------------------   
11  
12要用JS吧   
13\---------------------------------------------------------------   
14  
15<meta content="3;URL=http://www.cnool.net/" http-equiv="REFRESH"/>   
16\---------------------------------------------------------------   
17  
18实现这样的功能一般都是用js来实现:   
19  
20  
21<html>
22<body>
23<div align="center">
24<center>
25<table border="1" height="209" width="34%">
26<tr>
27<td height="203" width="100%">
28<form action="12.asp" method="POST" name="form1">
29<p>姓名:<input name="T1" size="20" type="text"/></p>
30<p>密码:<input name="T2" size="20" type="password"/></p>
31<p align="center"><input name="B1" type="submit" value="提交"/></p>
32</form>
33<p> </p></td>
34</tr>
35</table>   
36还有最后<p color="red" id="pr">10</p>秒,加油啊!   
37</center>
38</div>
39<script language="javascript">   
40wait=10;   
41function submitForm(){   
42wait--;   
43pr.innerText=wait;   
44if (wait==0)document.form1.submit();   
45setTimeout("submitForm()",1000)   
46}   
47window.setTimeout("submitForm()",1000);   
48</script>
49</body>
50</html></delayseconds>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus