做一下注册和登陆跳转界面

来源:互联网 发布:江苏域名备案 编辑:程序博客网 时间:2024/05/16 15:32

接下来做一下注册和登陆等待界面

注册:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>会员注册</title>
</head>
<body>
<form method="post" action="register.php">
账  户:
<input type="text" name="username"><br/><br/>
密  码:
<input type="password" name="password"><br/><br/>
请确认密码:
<input type="password" name="password2">
<input type="submit" value="注册" name="sub">
</form>
</body>
</html>
登陆
<html>
  <head>
    <title>ok.html</title>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <script type="text/javascript">
        function skip() {
          clearInterval(mytime);
          window.open("manage.html","_self");
        }
        setTimeout("skip()",3000);
        function changeSec() {
           //得到myspan值
           $('myspan').innerText=$('myspan').innerText-1;
        }
         function $(id) {
        return document.getElementById(id);
      }
        var mytime = setInterval("changeSec()",1000);
    </script>
  </head>
  <body>
    登录成功,<span id="myspan">3</span>秒后自动跳转到管理页面
  </body>
</html>

关键在几个函数的使用,setTimeout("tiao()",3000);函数是打开页面,等待3秒,调用tiao()函数。setInterval("changeSec()",1000);函数是每隔1秒调用一次changeSec()函数。
呈现效果
注册
登陆跳转


0 0
原创粉丝点击