5钟页面跳转
作者:互联网
第一个页面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>1</title>
<script language="javascript" type="text/javascript" >
<!--
function jump(){
if($("textId").value=="付政委" && $("pwId").value == "zxcvbnm"){
window.alert("输入正确");
return true;
}else{
$("textId").value = "";
$("pwId").value = "";
window.alert("错了");
return false;
}
}
function $(id){
return document.getElementById(id);
}
//-->
</script>
</head>
<body>
<form action="2.html">
姓名:<input type="text" id="textId"/><p>
密码:<input type="password" id="pwId"/><p>
<input type="submit" value="提交" οnclick="return jump()"/>
</form>
</body>
</html>
第二个页面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>2</title>
<script language="javascript" type="text/javascript">
<!--
//跳转页面函数
function jump(){
clearInterval(xx);
window.open("3.html","_self");
}
//时间倒计时函数
function time(){
$("myTime").innerText = parseInt($("myTime").innerText) - 1;
}
setTimeout("jump()",5000);//5秒后开始执行这个函数
var xx = setInterval("time()",1000);//1秒后循环这个函数
function $(id){
return document.getElementById(id);
}
//-->
</script>
</head>
<body>
将在<span id="myTime">5</span>秒后跳至管理员页面
</body>
</html>
第三个页面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>3</title>
</head>
<body>
欢迎来到管理员界面
</body>
</html>
标签:function,www,http,xhtml1,w3,跳转,org,页面 来源: https://blog.51cto.com/u_14943622/2834975