高手请进来看下 小弟方法用尽还是不行 如何实现3秒跳转 麻烦用我的思路解决谢谢!
<script language="javascript">var temp=0;
function tosucess()
{
if(temp==0)
{
var mytime=setTiemout("tosucess()",3000);
temp=1;
}
else
{
var jj=3;
}
}
</script>
</head>
<body onLoad="setTimeout("tosucess()",3000)">
<%
String sql="select count(*) from login where username=? and password=?";
PreparedStatement state=Connect.conn(sql);
state.setString(1,request.getParameter("username"));
state.setString(2,request.getParameter("password"));
ResultSet rs=state.executeQuery();
while(rs.next())
{
if(rs.getString(1).equals("1"))
{
%>
<div align="center"><%="登陆成功!" %></div><br>
<div align="center"><a href="sucess.html"><%="此页面3秒后跳转!若没有响应请点击此链接进行手动跳转" %></a></div>
<%
}
else
{
out.print("\""+request.getParameter("username")+"\""+"用户不存在或密码错误!");
}
}
%>