代码:
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>用户注册</title> </head> <body> <form method="post" action=""> <table align="center" border="0" cellpadding="1" cellspacing="6" bgcolor="skyblue"> <caption><h3>用户注册</h3></caption> <tr align="center"> <td align="left"><label for="name">姓名:</label></td> <td align="left"><input type="text" id="name" name="name" placeholder="jobing"></td> </tr> <tr align="center"> <td align="left"><label for="password">密码:</label></td> <td align="left"><input type="password" id="password" name="password" placeholder="至少6位"></td> </tr> <tr align="center"> <td align="left">性别:</td> <td align="left"> <input type="radio" name="sex" value="male">男 <input type="radio" name="sex" value="female">女 <input type="radio" name="sex" value="secret">保密 </td> </tr> <tr align="center"> <td align="left">个人爱好</td> <td align="left"> <input type="checkbox" name="hobby[]" value="literature">文学 <input type="checkbox" name="hobby[]" value="movie">影视 <input type="checkbox" name="hobby[]" value="music">音乐 <input type="checkbox" name="hobby[]" value="sport">体育 </td> </tr> <tr align="center"> <td align="left"><label for="city">所在城市:</label></td> <td align="left"> <select name="city" id="city"> <option>北京</option> <option>上海</option> <option>广州</option> <option>深圳</option> </select> </td> </tr> <tr align="center"> <td align="left"><label for="adress">家庭住址:</label></td> <td align="left"><input type="text" name="adress" id="adress" placeholder="南山区滨海大道三诺大厦"></td> </tr> <tr align="center"> <td align="left"><label for="email">电子邮箱:</label></td> <td align="left"><input type="text" name="email" id="email" placeholder="jobing@php.cn"></td> </tr> <tr align="center"> <td align="left"><label for="photo">头像:</label></td> <td align="left"> <input type="file" name="photo" id="photo" accept="image/*"> </td> </tr> <tr align="center"> <td align="left"><label for="information"></label>备注:</td> <td align="left"><textarea rows="5" cols="30" placeholder="信息说明"></textarea></td> </tr> <tr align="center"> <td align="center" colspan="2"> <hr> <input type="submit" name="submit" value="提交"> <input type="reset" name="reset" value="重置"> </td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手写代码: