我的一个小程序定时循环变换图片
<form method="post" action="" name="form1" id="form1"><input type="text" name="t1" id="t1" />
<input type="hidden" name="hd1" id="hd1" />
</form>
<script language="javascript">
setTimeout("tj()",5000);
function tj(){
document.form1.submit();
}
</script>
<%
response.buffer=true
if request.Cookies("id")<>"" then
response.Cookies("id")=request.Cookies("id")+1
else
response.Cookies("id")=1
end if
%>
<p>
<!--#include file="conn/conn.asp"-->
<%
rs.open "select * from 职工信息",cn,1,1
%>
<p>
<%
if cint(request.Cookies("id"))>rs.recordcount then
response.Cookies("id")=1
end if
rs.close
sql="select * from 职工信息 where id=" & request.Cookies("id")
rs.open sql,cn,1,1
response.Write rs("照片")
%>
<p>
<img src=<%=rs("照片")%> />
<%
rs.close
%>
调试成功