博客列表 >实战案例:注册表单和课程表

实战案例:注册表单和课程表

寻梦人
寻梦人原创
2023年01月17日 17:45:33267浏览

1. 课程表

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>课程表</title>
  8. </head>
  9. <body>
  10. <table border="1" align="center" style="text-align: center;">
  11. <caption>第一中学高二(7)班课程表</caption>
  12. <thead>
  13. <tr bgcolor="lightgreen">
  14. <th></th>
  15. <th>星期一</th>
  16. <th>星期二</th>
  17. <th>星期三</th>
  18. <th>星期四</th>
  19. <th>星期五</th>
  20. </tr>
  21. </thead>
  22. <tbody>
  23. <tr>
  24. <td rowspan="4" bgcolor="lightblue">上午</td>
  25. <td>语文</td>
  26. <td>化学</td>
  27. <td>物理</td>
  28. <td>生物</td>
  29. <td>数学</td>
  30. </tr>
  31. <tr>
  32. <td>语文</td>
  33. <td>化学</td>
  34. <td>物理</td>
  35. <td>生物</td>
  36. <td>数学</td>
  37. </tr>
  38. <tr>
  39. <td>语文</td>
  40. <td>化学</td>
  41. <td>物理</td>
  42. <td>生物</td>
  43. <td>数学</td>
  44. </tr>
  45. <tr>
  46. <td>语文</td>
  47. <td>化学</td>
  48. <td>物理</td>
  49. <td>生物</td>
  50. <td>数学</td>
  51. </tr>
  52. <tr>
  53. <td colspan="6">中午休息</td>
  54. </tr>
  55. <tr>
  56. <td rowspan="3" bgcolor="lightblue">下午</td>
  57. <td>数学</td>
  58. <td>化学</td>
  59. <td>语文</td>
  60. <td>物理</td>
  61. <td>生物</td>
  62. </tr>
  63. <tr>
  64. <td>数学</td>
  65. <td>化学</td>
  66. <td>语文</td>
  67. <td>物理</td>
  68. <td>生物</td>
  69. </tr>
  70. <tr>
  71. <td>数学</td>
  72. <td>化学</td>
  73. <td>语文</td>
  74. <td>物理</td>
  75. <td>生物</td>
  76. </tr>
  77. <tfoot>
  78. <tr>
  79. <td>备注:</td>
  80. <td colspan="5">20点半开始晚自习</td>
  81. </tr>
  82. </tfoot>
  83. </tbody>
  84. </table>
  85. </body>
  86. </html>

2.注册表单

  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  7. <title>用户注册表</title>
  8. <form action="index.php" method="post">
  9. <fieldset style="display: inline-grid; gap: 1em">
  10. <legend>用户注册</legend>
  11. <div>
  12. <label for="username">用户名:</label>
  13. <input type="text" name="username" id="username" placeholder="username" required>
  14. </div>
  15. <div>
  16. <label for="my-email">邮箱:</label>
  17. <input type="email" name="my-email" id="my-email" required placeholder="username@***.com"/>
  18. </div>
  19. <div>
  20. <label for="psw">密码:</label>
  21. <input type="password" name="psw" id="psw" required placeholder="******"
  22. />
  23. </div>
  24. <div>
  25. <label for="secrecy">性别:</label>
  26. <input type="radio" name="gender" id="male"><label for="male"></label>
  27. <input type="radio" name="gender" id="female"><label for="female"></label>
  28. <input type="radio" name="gender" id="secrecy"><label for="secrecy">保密</label>
  29. </div>
  30. <div>
  31. <label for="age">年龄:</label>
  32. <input type="number" name="age" id="age" value="25" min="20" max="45">
  33. </div>
  34. <div>
  35. <label for="birthday">生日:</label>
  36. <input type="date" name="birthday" id="birthday">
  37. </div>
  38. <div>
  39. <label for="blog">博客:</label>
  40. <input type="url" name="blog" id="blog" placeholder="http://">
  41. </div>
  42. <div>
  43. <label for="xue">学历:</label>
  44. <select name="xue" id="xue">
  45. <option value="1">初中</option>
  46. <option value="2" selected>高中</option>
  47. <option value="3">大学</option>
  48. </select>
  49. </div>
  50. <div>
  51. <label for="hobby">爱好:</label>
  52. <input type="checkbox" name="hobby[]" id="travels" checked><label for="travels">旅游</label>
  53. <input type="checkbox" name="hobby[]" id="shoot"><label for="shoot">摄影</label>
  54. <input type="checkbox" name="hobby[]" id="program"><label for="program" >编程</label>
  55. </div>
  56. <div>
  57. <label for="image">头像:</label>
  58. <input type="file" name="image" id="image" accept="image/jpeg,image/png" ">
  59. </div>
  60. <div>
  61. <label for="remarks">备注:</label><textarea name="" id="remarks" cols="30" rows="10" placeholder="请输入内容..." value=""></textarea>
  62. </div>
  63. <button type="submit">登录</button>
  64. </form>
  65. </fieldset>
  66. </head>
  67. <body></body>
  68. </html>
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议