实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>3.19作业</title> </head> <body> <form action="" method="post"> <table border="0" cellspacing="0" cellpadding="5" width="500" align="center" bgcolor="lightgreen"> <caption><h3 colspan="2">用户登录</h3></caption> <tr><td colspan="2"><hr></td></tr> <tr align="center"> <td><label for="name">用户名</label></td> <td align="left"><input type="text" id="name" name="username" value="" size="32"></td> </tr> <tr align="center"> <td><label for="password">密码</label></td> <td align="left"><input type="text" id="password" name="password" placeholder="字母+数字 不少于8位" size="32"></td> </tr> <tr align="center"> <td><label for="age">年龄</label></td> <td align="left"><input type="text" id="age" name="age" value="" size="32"></td> </tr> <tr align="center"> <td>性别</td> <td align="left"><input type="radio" name="sex" value="man">男 <input type="radio" name="sex" value="woman">女 <input type="radio" name="sex" value="secret" checked="">保密</td> </tr> <tr align="center"> <td>所学内容</td> <td align="left"><input type="checkbox" name="hobby[]"> html <input type="checkbox" name="hobby[]">css <input type="checkbox" name="hobby[]">javascript <input type="checkbox" name="hobby[]" checked="">PHP </td> </tr> <tr align="center"> <td>学习程度</td> <td align="left"><select name="level"> <option value="0">刚入门</option> <option value="1" selected="">2年经验</option> <option value="2">5年经验</option> <option value="3">零基础</option></select> </td> </tr> <tr align="center"> <td>头像</td> <td align="left"><img src="../images/1.jpg" width="40"> <input type="file" name="photo" accept="image/*.jpg"></td> </tr> <tr align="center"> <td>备注</td> <td align="left"><textarea name="comment" rows="5" cols="52"></textarea></td> </tr> <tr> <td colspan="2" align="center"> <hr> <input type="submit" name="submit" value="提交"> <input type="reset" name="reset" value="重置"></td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例