博客列表 >1209作业-表格课程表|表单和属性

1209作业-表格课程表|表单和属性

葡萄枝子
葡萄枝子原创
2020年12月09日 23:33:54745浏览

1209作业-课程表|表单

1、制作一个课程表

  1. <table class="course" border="1">
  2. <caption>课程表</caption>
  3. <thead>
  4. <tr>
  5. <td colspan="2"></td>
  6. <td>星期一</td>
  7. <td>星期二</td>
  8. <td>星期三</td>
  9. <td>星期四</td>
  10. <td>星期五</td>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <tr>
  15. <td rowspan="4">上午</td>
  16. <td>1</td>
  17. <td>语文</td>
  18. <td>数学</td>
  19. <td>物理</td>
  20. <td>化学</td>
  21. <td>体育</td>
  22. </tr>
  23. <tr>
  24. <td>2</td>
  25. <td>数学</td>
  26. <td>物理</td>
  27. <td>化学</td>
  28. <td>体育</td>
  29. <td>语文</td>
  30. </tr>
  31. <tr>
  32. <td>3</td>
  33. <td>物理</td>
  34. <td>化学</td>
  35. <td>体育</td>
  36. <td>语文</td>
  37. <td>数学</td>
  38. </tr>
  39. <tr>
  40. <td>4</td>
  41. <td>化学</td>
  42. <td>体育</td>
  43. <td>语文</td>
  44. <td>数学</td>
  45. <td>物理</td>
  46. </tr>
  47. <tr>
  48. <td colspan="7">中午休息</td>
  49. </tr>
  50. <tr>
  51. <td rowspan="3"></td>
  52. <td>5</td>
  53. <td>体育</td>
  54. <td>语文</td>
  55. <td>数学</td>
  56. <td>物理</td>
  57. <td>化学</td>
  58. </tr>
  59. <tr>
  60. <td>6</td>
  61. <td>语文</td>
  62. <td>数学</td>
  63. <td>物理</td>
  64. <td>化学</td>
  65. <td>体育</td>
  66. </tr>
  67. <tr>
  68. <td>7</td>
  69. <td>课外活动</td>
  70. <td colspan="4">自由活动</td>
  71. </tr>
  72. </tbody>
  73. </table>

2、表单控件课例全演

Form表单

  1. <form action="checkForm.php" method="POST" class="checkForm" id="checkForm" enctype="multipart/form-data">
  2. <p>
  3. <label for="text-field">text</label>
  4. <input type="text" name="text" id="text-field" value="" placeholder="tipText" required="required" />
  5. </p>
  6. <p>
  7. <label for="email-field">email</label>
  8. <input type="email" name="email" id="email-field" value="" placeholder="demo@abc.com" />
  9. </p>
  10. <p>
  11. <label for="password-field">password</label>
  12. <input type="password" name="password" id="password-field" value="" />
  13. </p>
  14. <p>
  15. <label for="#">radio</label>
  16. <input type="radio" name="radio" id="radio-field-1" value="1" checked="checked" /><label for="radio-field-1">radio1</label>
  17. <input type="radio" name="radio" id="radio-field-2" value="2" /><label for="radio-field-2">radio2</label>
  18. </p>
  19. <p>
  20. <label for="#">checkbox</label>
  21. <input type="checkbox" name="checkbox[]" id="checkbox-field-1" value="1" /><label for="checkbox-field-1">checkbox1</label>
  22. <input type="checkbox" name="checkbox[]" id="checkbox-field-2" value="2" /><label for="checkbox-field-2">checkbox2</label>
  23. </p>
  24. <p>
  25. <label for="select-field">select</label>
  26. <select name="select" id="select-field">
  27. <option value="1" selected="selected">one</option>
  28. <option value="2">two</option>
  29. <option value="3">three</option>
  30. </select>
  31. </p>
  32. <p>
  33. <label for="file-field">file</label>
  34. <input type="file" name="file" id="file-field" />
  35. <span class="tips"></span>
  36. </p>
  37. <p>
  38. <label for="textarea-field">textarea</label>
  39. <textarea name="textarea" id="textarea-field" cols="30" rows="10" placeholder="textareaTips"></textarea>
  40. </p>
  41. <p>
  42. <input type="hidden" name="hidden" value="hide" />
  43. <input type="hidden" name="MAX_FILE_SIZE" value="80000" />
  44. <button type="submit">submit</button>
  45. </p>
  46. </form>

Form属性

  1. <form action="checkForm2.php" method="POST" class="checkForm" id="checkForm2"></form>
  2. <p>
  3. <label for="text-field">text</label>
  4. <input type="text" name="text" id="text-field" value="" placeholder="tipText" required="required" form="checkForm2" />
  5. </p>
  6. <p>
  7. <label for="email-field">email</label>
  8. <input type="email" name="email" id="email-field" value="" placeholder="demo@abc.com" form="checkForm2" />
  9. </p>
  10. <p>
  11. <button type="submit" form="checkForm2">submit</button>
  12. </p>
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议