Home >Web Front-end >HTML Tutorial >HTML drawing user registration page

HTML drawing user registration page

高洛峰
高洛峰Original
2017-02-18 15:45:512492browse

The example of this article shares the specific implementation code of HTML drawing user registration page for your reference. The specific content is as follows

<html>  
   <head>  
     <script>  
        function aa()   
        {   
           var s;   
           s=reg.user.value;   
           alert("用户名是"+s);   
             }   
        function aa2(t)   
        {   
           var p1,p2;    
            alert(t);   
            p1=reg.pass1.value;   
            p2=reg.pass2.value;   
            if(p1!=p2)   
              alert("两次密码不一致");   
  
            }   
  
     </script>  
   </head>  
   <body>  
     <h1 align="center">注册</h1>  
     <table align="center" border="2" width="400" bgcolor="pink">  
      <form name="reg">  
        <tr><td>用户名</td><td><input type="text" name="user"></td></tr>  
        <tr><td>密码</td><td><input type="password" name="pass1"></td></tr>  
        <tr><td>确认密码</td><td><input type="password" name="pass2"  onblur="aa2(this)"></td></tr>  
         <tr><td>性别</td><td><input type="radio" name="sex" value="1">男<input type="radio" name="sex" value="2" checked>女</td></tr>  
          <tr><td>爱好</td><td><input type="checkbox" name="hb1" value="ft">足球 <input type="checkbox" name="hb2" value="ms">音乐<input    
  
type="checkbox" name="hb3" value="tor" />旅游</td></tr>  
          <tr><td colspan="2"><input type="file" name="f1" /></td></tr>  
  
          <tr><td>学院</td><td>  
                          <select name="s">  
                            <option value="1"  selected>信息学院</option>  
                           <option value="2">管理学院</option>  
                            <option value="3">机电学院</option>  
                          </select>     
  
     <tr><td colspan="2" align="center"><input type="button" value="提交"  onclick="aa()" /> <input type="reset" value="重置" /></td></tr>  
  
      </form>  
  
   </body>  
</html>

The above is the entire content of this article, I hope It will be helpful to everyone's learning, and I hope everyone will support the PHP Chinese website.

For more articles related to HTML drawing user registration page, please pay attention to the PHP Chinese website!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn