实例
<!DOCTYPE html> <html> <head> <title>form</title> <meta charset="utf-8"> </head> <body> <form action="login.php" method="post"> <table cellpadding="5" cellspacing="0" align="center" width="600" bgcolor="#55AAAA"> <caption><h2>用户注册</h2></caption> <tr> <td colspan="2"><hr width="80%"></td> </tr> <tr align="center"> <td align="right"><label for="email">邮箱:</label></td> <td align="left"><input type="email" name="email" id="email" placeholder="abc@mail.com"></td> </tr> <tr align="center"> <td align="right"><label for="password">密码:</label></td> <td align="left"><input type="password" name="password" id="password" placeholder="不少于6位数字字母"></td> </tr> <!-- signal select --> <tr align="center"> <td align="right">性别:</td> <td align="left"> <input type="radio" name="sex" value="male">男 <input type="radio" name="sex" value="female">女 <input type="radio" name="sex" value="secret" checked="">保密 </td> </tr> <tr align="center"> <td align="right">兴趣:</td> <td align="left"> <input type="checkbox" name="hobby[]" value="football">足球 <input type="checkbox" name="hobby[]" value="basketball" checked="">篮球 <input type="checkbox" name="hobby[]" value="volleyball">排球 <input type="checkbox" name="hobby[]" value="badminton">羽毛球 </td> </tr> <tr align="center"> <td align="right">阶段:</td> <td align="left"> <select name="level"> <option value="one">基础</option> <option value="two" selected="">熟练</option> <option value="three">精通</option> <option value="four">大师</option> </select> </td> </tr> <tr align="center"> <td align="right">附件:</td> <td align="left"><input type="file" name="pic" accept="img/jpg"></td> </tr> <tr> <td align="right"><label for="intro">介绍:</label></td> <td align="left"> <textarea id="intro" rows="5" cols="30" placeholder="介绍自己"></textarea> </td> </tr> <tr align="center"> <td colspan="2"> <hr width="80%" color="lightblue"> <input type="submit" name="submit" value="提交"> <input type="reset" name="reset" value="重置"> </td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例