博客列表 >课程表练习和表单练习

课程表练习和表单练习

P粉019280626
P粉019280626原创
2023年02月02日 13:08:49469浏览
  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>Gao的作业1课程表</title>
  8. </head>
  9. <body>
  10. <div>
  11. <table width="800px" border="1px">
  12. <caption><h2>课程表</h2></caption>
  13. <tr>
  14. <th>周1</th>
  15. <th>周2</th>
  16. <th>周3</th>
  17. <th>周4</th>
  18. <th>周5</th>
  19. </tr>
  20. <tr>
  21. <td colspan="5" bgcolor="blue" align="center" >早自习</td>
  22. <!-- <td>早自习</td>
  23. <td>早自习</td>
  24. <td>早自习</td>
  25. <td>早自习</td> -->
  26. </tr>
  27. <tr>
  28. <td>数学</td>
  29. <td rowspan="2">语文</td>
  30. <td>英语</td>
  31. <td>体育</td>
  32. <td>音乐</td>
  33. </tr>
  34. <tr>
  35. <td>体育</td>
  36. <!-- <td>语文</td> -->
  37. <td>数学</td>
  38. <td>英语</td>
  39. <td>科学</td>
  40. </tr>
  41. <tr>
  42. <td>音乐</td>
  43. <td>英语</td>
  44. <td>体育</td>
  45. <td>语文</td>
  46. <td>数学</td>
  47. </tr>
  48. <tr>
  49. <td>英语</td>
  50. <td>数学</td>
  51. <td>体育</td>
  52. <td>语文</td>
  53. <td>科学</td>
  54. </tr>
  55. <tr>
  56. <td colspan="5" align="center" bgcolor="blue" >午休</td>
  57. <!-- <td>午休</td>
  58. <td>午休</td>
  59. <td>午休</td>
  60. <td>午休</td> -->
  61. </tr>
  62. <tr>
  63. <td>体育</td>
  64. <td>音乐</td>
  65. <td>语文</td>
  66. <td>数学</td>
  67. <td>音乐</td>
  68. </tr>
  69. <tr>
  70. <td>英语</td>
  71. <td>语文</td>
  72. <td>美术</td>
  73. <td>体育</td>
  74. <td rowspan="2">数学</td>
  75. </tr>
  76. <tr>
  77. <td>语文</td>
  78. <td>科学</td>
  79. <td>英语</td>
  80. <td>美术</td>
  81. <!-- <td>数学</td> -->
  82. </tr>
  83. <tr>
  84. <td colspan="5" align=center bgcolor="blue" >晚自习</td>
  85. <!-- <td>晚自习</td>
  86. <td>晚自习</td>
  87. <td>晚自习</td>
  88. <td>晚自习</td> -->
  89. </tr>
  90. </table>
  91. </div>
  92. </body>
  93. </html>
  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>Gao的作业2-表单</title>
  8. </head>
  9. <body>
  10. <form action="baoming.php" method="POST">
  11. <fieldset style="gap:1em">
  12. <legend><h4>报名表</h4></legend>
  13. <!-- 单行文本 -->
  14. <div class="mingzi">
  15. <label for="xinmin">姓名:</label>
  16. <input type="text" name="mingzi" id="xinmin" placeholder="输入姓名" required autofocus/>
  17. </div>
  18. <!-- 邮箱 -->
  19. <div class="memail">
  20. <label for="youxiang">邮箱:</label>
  21. <input type="email" name="memail" id="youxiang" placeholder="输入邮箱" required />
  22. </div>
  23. <!-- 密码 -->
  24. <div class="pass">
  25. <label for="mima">密码:</label>
  26. <input type="password" name="mpass" id="mima" placeholder="******" required />
  27. </div>
  28. <!-- 年龄 -->
  29. <div class="mnianling">
  30. <label for="nianling">年龄:</label>
  31. <!-- value="30" placeholder="40",经测试,value和placeholder同时有的时候,placeholder失效。 -->
  32. <input type="number" name="mnianling" id="nianling" min="20" max="60" value="30" placeholder="40" required />
  33. </div>
  34. <!-- 出生年月 -->
  35. <div class="mshengri">
  36. <label for="shengri">出生年月:</label>
  37. <input type="date" name="mshengri" id="shengri" required />
  38. </div>
  39. <!-- 拾色器 -->
  40. <div class="myanse">
  41. <label for="yanse">拾色器:</label>
  42. <input type="color" name="myanse" id="yanse" />
  43. </div>
  44. <!-- url -->
  45. <div class="murl">
  46. <label for="url">报名网址:</label>
  47. <input type="url" name="murl" id="url" placeholder="php.cn" required />
  48. </div>
  49. <!-- 搜索 -->
  50. <div class="msousuo">
  51. <label for="sousuo">搜索框:</label>
  52. <input type="search" name="msousuo" id="sousuo" placeholder="输入关键字" />
  53. </div>
  54. <!-- 上传文件 -->
  55. <div class="mwenjian">
  56. <label for="wenjian">上传文件:</label>
  57. <input type="file" name="mwenjian" id="wenjian" accept="file/pdf,file/wps" />
  58. <button type="button" onclick="fileUploads(this,form)">上传</button>
  59. </div>
  60. <!-- 性别 -->
  61. <div class="xinbie">
  62. <label for="baomi">性别:</label>
  63. <input type="radio" name="mxinbie" id="nan" /> <label for="nan"></label>
  64. <input type="radio" name="mxinbie" id="nv" /> <label for="nv"></label>
  65. <input type="radio" name="mxinbie" id="baomi" checked /> <label for="baomi">保密</label>
  66. </div>
  67. <!-- 职业 -->
  68. <div class="zhiye">
  69. <label for="zhiye">职业:</label>
  70. <input type="checkbox" name="mzhiye[]" id="laoshi" checked /> <label for="laoshi">老师</label>
  71. <input type="checkbox" name="mzhiye[]" id="jinli" /> <label for="jinli">经理</label>
  72. <input type="checkbox" name="mzhiye[]" id="changzhang" /> <label for="changzhang">厂长</label>
  73. <input type="checkbox" name="mzhiye[]" id="zhuren" checked /> <label for="zhuren">主任</label>
  74. </div>
  75. <!-- 学历 -->
  76. <!-- checked 默认值加上不生效,暂时不知道怎么设置下拉的默认值 -->
  77. <div class="xueli">
  78. <label for="">学历:</label>
  79. <select name="edu" id="edu" form="" >
  80. <option value="">------请选择-------</option>
  81. <optgroup label="高中或专科">
  82. <option value="5">高中</option>
  83. <option value="6">专科</option>
  84. </optgroup>
  85. <optgroup label="本科及以上">
  86. <option value="1">本科学历学位</option>
  87. <option value="2">本科无学位</option>
  88. <option value="3">硕士学历学位</option>
  89. <option value="4">硕士学位</option>
  90. </optgroup>
  91. </select>
  92. </div>
  93. <button type="submit">提交报名</button>
  94. </fieldset>
  95. </form>
  96. </body>
  97. </html>
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议
P粉0192806262023-02-05 21:02:341楼
谢谢老师,下次加图