Blogger Information
Blog 2
fans 0
comment 0
visits 713
Related recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0629作业
chace
Original
362 people have browsed it

0629作业

作业内容:写一个商品信息表,要求有id,品名,价格,数量,金额等字段, 最后要有合计,如总数, 总金额,并且商品按品类进行合并显示,要求用到行与列的合并

作业结果

代码

  1. <!DOCTYPE html>
  2. <html lang="en">
  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>Document</title>
  8. </head>
  9. <body>
  10. <table border="1">
  11. <caption>商品信息表</caption>
  12. <tbody>
  13. <tr bgcolor="lightblue">
  14. <td>品类</td>
  15. <td>ID</td>
  16. <td>品名</td>
  17. <td>价格</td>
  18. <td>数量</td>
  19. <td>金额</td>
  20. </tr>
  21. <tr>
  22. <td rowspan="2";>水果</td>
  23. <td>A1</td>
  24. <td>苹果</td>
  25. <td>5.5</td>
  26. <td>5</td>
  27. <td>27.5</td>
  28. </tr>
  29. <tr>
  30. <td>A2</td>
  31. <td>香蕉</td>
  32. <td>1.8</td>
  33. <td>2</td>
  34. <td>3.6</td>
  35. </tr>
  36. <tr>
  37. <td rowspan="2";>蔬菜</td>
  38. <td>A3</td>
  39. <td>草莓</td>
  40. <td>3.8</td>
  41. <td>8</td>
  42. <td>30.4</td>
  43. </tr>
  44. <tr>
  45. <td>A4</td>
  46. <td>草莓</td>
  47. <td>3.8</td>
  48. <td>8</td>
  49. <td>30.4</td>
  50. </tr>
  51. </tbody>
  52. <tfoot>
  53. <tr bgcolor="yellow">
  54. <td colspan="2">总数量</td>
  55. <td>23</td>
  56. <td colspan="2">总金额</td>
  57. <td>91.9</td>
  58. </tr>
  59. </tfoot>
  60. </table>
  61. </body>
  62. </html>
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post