实例 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>3-19 表单练习</title> </head> <body> <form action="" method="post" accept-charset="utf-8" > <fieldset style="width:400px;" align=center> <legend>用户注册</legend> <table width="390" bgcolor="FFD9EC" cellspacing="1" cellpadding="10" border="0"> <thead> <tr> <th><hr color="lightskyblue"></th> </tr> </thead> <tbody> <tr> <td><label for="email">邮箱:</label><input type="text" id="email" name="email" value="" placeholder="example@mail.com"></td> </tr> <tr> <td><label for="password">密码:</label><input type="password" id="password" name="password" value="" placeholder="请输入8位数以上字符"></td> </tr> <tr> <td> <label>性别:</label> <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> <td> <label>兴趣:</label> <input type="checkbox" name="choices[]" value="">HTML <input type="checkbox" name="choices[]" value="" >CSS <input type="checkbox" name="choices[]" value="">JavaScript <input type="checkbox" name="choices[]" value="" checked="">PHP </td> </tr> <tr> <td> <label>级别:</label> <select name="level"> <option value="">零基础</option> <option value="">入门级</option> <option value="">初级</option> <option value="">中级</option> <option value="">高级</option> </select> </td> </tr> <tr> <td> <label>头像:</label> <img src="https://gss0.bdstatic.com/70cFsj3f_gcX8t7mm9GUKT-xh_/avatar/100/r6s1g7.gif" width="30"> <input type="file" name="" value="" placeholder="上传头像"> </td> </tr> <tr> <td> <label >简介:</label> <textarea name="" rows="5" cols="40" placeholder="文明上网,请勿下片!"></textarea> </td> </tr> <tr> <td align="center"> <hr color="lightskyblue"> <input type="submit" value="提交"> <input type="reset" name="" value="重填"> </td> </tr> </tbody> </table> </fieldset> </form> </body> </html> 运行实例 » 点击 "运行实例" 按钮查看在线实例