代码:
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>用户注册</title> </head> <body > <form action="" method="post"> <h2 align="center">用户注册</h2> <table width="380" align="center" bgcolor="#46a3ff" > <tr> <td colspan="2"> <hr width="90%"> </td> </tr> <tr> <td align="right"> <label for="accunt">帐号:</label> </td> <td> <input type="text" id="accunt" name="accunt" placeholder="请输入帐号"> </td> </tr> <tr> <td align="right"> <label for="secert">密码:</label> </td> <td> <input type="password" id="secert" name="secert" placeholder="请输入密码"> </td> </tr> <tr> <td align="right">性别:</td> <td> <input type="radio" name="sex" value="male">男 <input type="radio" name="sex" value="female">女 <input type="radio" name="sex" value="secert" checked>保密</td> </tr> <tr> <td align="right">兴趣:</td> <td> <input type="checkbox" name="interest[]">篮球 <input type="checkbox" name="interest[]">足球 <input type="checkbox" name="interest[]">游泳 <input type="checkbox" name="interest[]">兵乓球</td> </tr> <tr> <td align="right">级别:</td> <td> <select name="grade" id="grade"> <option value="low">初级</option> <option value="middle">中级</option> <option value="high">高级</option> </select> </td> </tr> <tr> <td align="right">头像:</td> <td><img src="images/katong.png" width="30" alt="头像"> <input type="file" name="picture"> </td> </tr> <tr> <td align="right">简介:</td> <td> <textarea name="intro" rows="5" cols="40" placeholder="请输入简介"></textarea> </td> </tr> <tr> <td colspan="2"> <hr width="90%"> </td> </tr> <tr align="center"> <td colspan="2"> <button type="submit">提交</button> <button type="reset">重置</button> </td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手写代码: