演示地址:http://111.231.88.20/front/html/0319/0319.html
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>0319作业</title> </head> <body> <form action="" method="post"> <table border="0" cellspacing="0" cellpadding="6" width="450" align="center" bgcolor="lightyellow"> <caption><h2>注册会员</h2></caption> <tr align="center"> <td colspan="2"><hr></td></tr> <!-- 添加一条分割线 --> <tr align="center"> <td align="right" width="100"><label for="name">用户名:</label></td> <td align="left"><input type="text" id="name" name="name" value="" placeholder="不得包含特殊字符" size="30"></td> </tr> <tr align="center"> <td align="right"><label for="password">密码:</label></td> <td align="left"><input type="password" id="password" name="name" value="" placeholder="字母+数字不得少于8位" size="30"></td> </tr> <tr align="center"> <td align="right"><label for="email">邮箱:</label></td> <td align="left"><input type="email" id="email" name="email" value="" placeholder="123@qq.com" size="30"></td> </tr> <tr align="center"> <td align="right">性别:</td> <td align="left"> <input type="radio" name="male">男 <input type="radio" name="femele">女 <input type="radio" name="secret" checked="">保密 </td> </tr> <tr align="center"> <td align="right">爱好:</td> <td align="left"><input type="checkbox" name="hobby[]" value="swin">游泳 <input type="checkbox" name="hobby[]" value="game">游戏 <input type="checkbox" name="hobby[]" value="book" checked="">看书</td> </tr> <tr align="center"> <td align="right"><label for="age">网龄:</label></td> <td align="left"> <select name="age" id="age"> <option value="">一年以内</option> <option value="" selected="">二至三年</option> <option value="">四至八年</option> <option value="">八年以上</option> </select> </td> </tr> <tr align="center"> <td align="right"><label for="photo">上传头像</label></td> <td align="left"> <img src="./images/01.jpg" height="30"> <input type="file" id="photo" name="photo" accept="image/*"> </td> </tr> <tr align="center"> <td align="right"><label for="summary">个人简介</label></td> <td align="left"> <textarea name="summary" id="summary" rows="5" cols="45" placeholder="十字以上的个人简介"></textarea> </td> </tr> <tr align="center"> <td colspan="2"> <hr> <input type="submit" name="submit" value="提交注册"> <!-- 空格符号 --> <input type="reset" name="reset" value="重置"> </td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手抄代码