慢慢的在进步了!!!加油,加油!!!
代码:
实例
实例 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>实战用户注册</title> </head> <body> <form action="" method="post"> <table border="0" cellspacing="0" cellpadding="5" width="80%" bgcolor="lightgreen"> <caption><h3 >用户注册</h3></caption> <tr> <td colspan="2" ><hr></td> </tr> <tr> <td><label for="user">用户名:</label></td> <td><input type="text" name="user" id="user" value="" placeholder="数字+字母"></td> </tr> <tr> <td><label for="password">登录密码:</label></td> <td><input type="password" name="password" id="password" value="" placeholder="不少于8个字符"></td> </tr> <tr> <td>性别:</td> <td> <input type="radio" name="sex" value="male">男 <input type="radio" name="sex" value="female">女 <input type="radio" name="sex" value="secret" checked>保密 </td> <!--checked和selected 均为本选项为默认选项--> </tr> <tr> <td>职业:</td> <td> <select> <option value="0">销售</option> <option value="1" selected>房地产</option> <option value="2">程序员</option> <option value="3">收银员</option> </select> </td> </tr> <tr> <td><label for="style">联系方式:</label></td> <td><input type="text" name="style" id="style" value="" placeholder="只能11位的手机号"></td> </tr> <tr> <td><label for="qq">QQ:</label></td> <td><input type="text" name="qq" id="qq" value="" placeholder="最好是本人的"></td> </tr> <tr> <td>爱好:</td> <td> <input type="checkbox" name="hobby[]" value="0">打篮球 <input type="checkbox" name="hobby[]" value="0">跑步 <input type="checkbox" name="hobby[]" value="0">玩游戏 <input type="checkbox" name="hobby[]" value="0">打牌 </td> </tr> <tr> <td><label for="autograph">签名档:</label></td> <td> <textarea rows="4" cols="40" id="autograph" name="autograph" placeholder="请注意自己的发言"></textarea> </td> </tr> <tr> <td><label for="photo">头像:</label></td> <td><img src="images/2.jpg" width="20"> <input type="file" id="photo" name="photo" value=""> </td> </tr> <tr> <td colspan="2" ><hr></td> </tr> <tr> <td colspan="2"> <input type="submit" name="sub" value="提交"> <input type="submit" name="sub" value="重置"> </td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手写代码: