亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

搜索
博主信息
博文 3
粉絲 0
評(píng)論 0
訪問量 2963
最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板
表格、表單以及簡單的地圖顯示(iframe)
Nicole
原創(chuàng)
779人瀏覽過

作業(yè)內(nèi)容:1. 制作一張課程表,或者商品列表,用戶信息表,要求用到行與列的合并 2. 制作 一張用戶注冊表單 ,要求用到常用的表單控件

1.制作一張課程表

筆記:
制作表格應(yīng)用<table>標(biāo)簽,其中<tr>表示行,<td>表示列。

<border>表示表格邊框。
cellspacing可以設(shè)置表格邊框,可設(shè)置為0,將表格邊框折疊。
cellpadding可設(shè)置表格內(nèi)容和表格邊框的距離。

<caption>標(biāo)簽可對(duì)表格標(biāo)題進(jìn)行設(shè)置。可在style中將font-weight設(shè)置為bolder,加粗表格標(biāo)題。設(shè)置margin-bottom,使得表格標(biāo)題和表格有距離,使表格更美觀。

其中rowspan和colspan可對(duì)表格的行和列單元格進(jìn)行合并,用法就是找到要合并的單元格位置起點(diǎn)設(shè)置要合并的單元格數(shù)量。

  1. <table border="1" cellspacing="0" cellpadding="5" width="80%">
  2. <caption style="font-weight: bolder; margin-bottom: 1em;">課程表</caption>
  3. <tr>
  4. <th>時(shí)間</th>
  5. <th>星期一</th>
  6. <th>星期二</th>
  7. <th>星期三</th>
  8. <th>星期四</th>
  9. <th>星期五</th>
  10. </tr>
  11. <tr>
  12. <td rowspan="2" bgcolor="lightblue">上午</td>
  13. <td>語文</td>
  14. <td>數(shù)學(xué)</td>
  15. <td>英語</td>
  16. <td>體育</td>
  17. <td>美術(shù)</td>
  18. </tr>
  19. <tr>
  20. <td>政治</td>
  21. <td>音樂</td>
  22. <td>歷史</td>
  23. <td>英語</td>
  24. <td>數(shù)學(xué)</td>
  25. </tr>
  26. <tr>
  27. <td rowspan="2" bgcolor="lightgreen">下午</td>
  28. <td>語文</td>
  29. <td>英語</td>
  30. <td>歷史</td>
  31. <td>數(shù)學(xué)</td>
  32. <td>美術(shù)</td>
  33. </tr>
  34. <tr>
  35. <td>政治</td>
  36. <td>數(shù)學(xué)</td>
  37. <td>美術(shù)</td>
  38. <td>英語</td>
  39. <td>數(shù)學(xué)</td>
  40. </tr>
  41. <tr>
  42. <td colspan="6" bgcolor="red">備注:早上8點(diǎn)上課,下午兩點(diǎn)開始上課。</td>
  43. </tr>
  44. </table>

2.制作一張用戶注冊表單

  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>用戶注冊</title>
  8. </head>
  9. <body>
  10. <form style="display: grid; gap: 0.5em;">
  11. <!-- 文本輸入框 -->
  12. <fieldset>
  13. <legend>必填項(xiàng)</legend>
  14. <div>
  15. <label for="username">帳號(hào):</label>
  16. <input type="text" id="username" placeholder="不能為空">
  17. </div>
  18. <div>
  19. <label for="password">密碼:</label>
  20. <input type="password" id="password" placeholder="必須同時(shí)包含字母和數(shù)字">
  21. </div>
  22. <div>
  23. <label for="email">郵箱:</label>
  24. <input type="email" id="email" placeholder="格式為:xxx@xx.com">
  25. </div>
  26. </fieldset>
  27. <!-- 單選按鈕:多選1 -->
  28. <div>
  29. <label for="secret">性別:</label>
  30. <input type="radio" name="gender" value="male" id="male" /><label for="male"></label>
  31. <input type="radio" name="gender" value="female" id="female" /><label for="female"></label>
  32. <input type="radio" name="gender" value="secret" id="secret" /><label for="female">保密</label>
  33. </div>
  34. <!-- 復(fù)選框 -->
  35. <div>
  36. <label for="">愛好</label>
  37. <input type="checkbox" name="hobby[]" id="programmer" checked><label for="programmer">編程</label>
  38. <input type="checkbox" name="hobby[]" id="game" ><label for="game">游戲</label>
  39. <input type="checkbox" name="hobby[]" id="shot" ><label for="shot">攝影</label>
  40. </div>
  41. <!-- 下拉列表 -->
  42. <select name="level" id="">
  43. <option value="1">銅牌會(huì)員</option>
  44. <option value="2">銀牌會(huì)員</option>
  45. <option value="3" selected>金牌會(huì)員</option>
  46. <option value="4">鉆石會(huì)員</option>
  47. </select>
  48. <!-- 輸入框+下拉列表 -->
  49. <div>
  50. <label for="">關(guān)鍵字:</label>
  51. <input type="search" name="search" id="" list="key"/>
  52. <datalist id="key">
  53. <option value="html"></option>
  54. <option value="css"></option>
  55. <option value="javascript"></option>
  56. </datalist>
  57. </div>
  58. <div>
  59. <button>提交</button>
  60. </div>
  61. </form>
  62. </body>
  63. </html>

3.簡單的地圖顯示

  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>map</title>
  8. </head>
  9. <body>
  10. <a href="https://j.map.baidu.com/61/g" target="map">北京</a>
  11. <a href="https://j.map.baidu.com/5f/7" target="map">合肥</a>
  12. <a href="https://j.map.baidu.com/45/g" target="map">上海</a>
  13. <hr/>
  14. <iframe srcdoc="<em>地圖顯示區(qū)</em>" frameborder="1" width="500" height="500" name="map"></iframe>
  15. </body>
  16. </html>

批改老師:天蓬老師天蓬老師

批改狀態(tài):合格

老師批語:
本博文版權(quán)歸博主所有,轉(zhuǎn)載請(qǐng)注明地址!如有侵權(quán)、違法,請(qǐng)聯(lián)系admin@php.cn舉報(bào)處理!
全部評(píng)論 文明上網(wǎng)理性發(fā)言,請(qǐng)遵守新聞評(píng)論服務(wù)協(xié)議
0條評(píng)論
作者最新博文
關(guān)于我們 免責(zé)申明 意見反饋 講師合作 廣告合作 最新更新
php中文網(wǎng):公益在線php培訓(xùn),幫助PHP學(xué)習(xí)者快速成長!
關(guān)注服務(wù)號(hào) 技術(shù)交流群
PHP中文網(wǎng)訂閱號(hào)
每天精選資源文章推送
PHP中文網(wǎng)APP
隨時(shí)隨地碎片化學(xué)習(xí)
PHP中文網(wǎng)抖音號(hào)
發(fā)現(xiàn)有趣的

Copyright 2014-2025 http://ipnx.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號(hào)

  • 登錄PHP中文網(wǎng),和優(yōu)秀的人一起學(xué)習(xí)!
    全站2000+教程免費(fèi)學(xué)