代码:
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>3.19作业</title> </head> <body> <form action="" method="post"> <table border="0" cellpadding="5" cellspacing="0" align="center" width="500" bgcolor="lightyellow"> <caption><h2>用户注册</h2></caption> <tr><td colspan="2"><hr> </td></tr> <tr align="center"> <td align="right" width="80"> <label for="name">用户名: </label> </td> <td align="left" width="300"><input type="text" id="name" name="name" value="" placeholder="XXX默认英文字母" size="50" width="200"> </td> </tr> <tr align="center"> <td align="right"> <label for="password">密码: </label> </td> <td align="left"><input type="password" name="name" id="password" value="" placeholder="字母+英文6-16位" size="50"> </td> </tr> <tr align="center"> <td align="right" >性别:</td> <td align="left"> <input type="radio" name="sex" value="">男 <input type="radio" name="sex" value="" checked="">女 <input type="radio" name="sex" value="">保密 </td> </tr> <tr align="center"> <td align="right">兴趣:</td> <td align="left"> <input type="checkbox" name="love[]" value="" checked="">吃饭 <input type="checkbox" name="love[]" value="">睡觉 <input type="checkbox" name="love[]" value="">打豆豆 </td> </tr> <tr align="center"> <td align="right"><label for="1">级别:</label></td> <td align="left"> <select name="1" id="1"> <option value="" selected="">我是小白</option> <option value="">我是老白</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/1.jpg" height="30" alt="wobuzhidao"> <input type="file" id="" name="photo" accept="images/*"> </td> </tr> <tr align="center"> <td valign="middle" align="right"><label>简介:</label></td> <td align="left"><textarea name="comment" id="comment" rows="5" cols="40" placeholder="多多发言,多多变白"></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>
运行实例 »
点击 "运行实例" 按钮查看在线实例
效果及手抄代码: