今天是第三天培训学习PHP。
代码:
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>表单注册</title> </head> <body> <form> <table border="0" cellspacing="0" cellpadding="8" align="center" bgcolor="skyblue"> <caption><h4>用户注册</h4></caption> <tr> <td colspan="2"><hr></td> </tr> <tr align="center"> <td align="right" width="60"><label for="email">邮箱:</label></td> <td align="left" width="300"><input type="text" id="email" name="email" value="" placeholder="example@php.com" size="30" width="200"/></td> </tr> <tr align="center"> <td align="right"><label for="pwd">密码:</label></td> <td align="left"><input type="password" id="pwd" name="pwd" value="" placeholder="字母+数字组合不少于8位" size="30"/></td> </tr> <tr align="center"> <td align="right">性别:</td> <td align="left"> <input type="radio" name="sex" value="male" checked>男 <input type="radio" name="sex" value="female">女 <input type="radio" name="sex" value="secret">保密 </td> </tr> <tr align="center"> <td align="right">爱好:</td> <td align="left"> <input type="checkbox" name="hobby[]">看电影 <input type="checkbox" name="hobby[]">打游戏 <input type="checkbox" name="hobby[]">读书<br> <input type="checkbox" name="hobby[]">游泳 <input type="checkbox" name="hobby[]">健身 </td> </tr> <tr align="center"> <td align="right">级别:</td> <td align="left"> <select> <option>零基础</option> <option>已经入门啦</option> <option>做过一些项目</option> <option>已经是大神啦</option> </select> </td> </tr> <tr align="center"> <td align="right">头像:</td> <td align="left"> <input type="file" name="photo"> </td> </tr> <tr align="center"> <td align="right">简介:</td> <td align="left"> <textarea cols="40" rows="5" placeholder="文明发言,禁止不文明用语"></textarea> </td> </tr> <tr align="left"> <td colspan="2" align="center"> <hr> <input type="submit" name="" value="提交"> <input type="reset" name="" value="重置"> </td> </tr> </table> </form> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手抄代码: