3.19_列表与表单及实战
代码:
实例
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>中医用户注册</title> </head> <body> <form action="" method="post"> <table border="0" cellspacing="0" cellpadding="8" align="center" width="400" bgcolor="powderblue"> <caption><h2>中医用户注册</h2></caption> <tr><td colspan="2"><hr></td></tr> <tr align="center"> <td align="right" width="60"><label for="name">手机</label></td> <td align="left" width="300"><input type="text" id="name" name="name" value="" placeholder="请输入11位手机号" size="30" width="200"></td> </tr> <tr align="center"> <td align="right"><label for="password">密码</label></td> <td align="left"><input type="text" id="password" name="name" value="" placeholder="密码不少于6位" size="30"></td> </tr> <tr align="center"> <td align="right">性别</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" checked="">保密 </td> </tr> <tr align="center"> <td align="right">擅长</td> <td align="left"> <input type="checkbox" name="happy[]" value="neike" checked="">内科 <input type="checkbox" name="happy[]" value="waike">外科 <input type="checkbox" name="happy[]" value="fuke">妇科 <input type="checkbox" name="happy[]" value="erke">儿科 </td> </tr> <tr align="center"> <td align="right"><label for="level">级别</label></td> <td align="left"> <select name="level" id="level"> <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="../html/images/13.png" height="30"> <input type="file" id="" name="photo" accept="image/*"> </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>
运行实例 »
点击 "运行实例" 按钮查看在线实例
手写代码: