2020-06-06 HTML重點(diǎn) 12課

1、<a>標(biāo)簽

  • 常用屬性
    • href =(hyper refence) 超鏈接 用于連接網(wǎng)頁(yè)
    • target
    • download
    • rel-noopener
  • a 的href的取值
    • 網(wǎng)址
      http://google.com
    • 路徑
      /a/b/c
    • 偽協(xié)議
    • js代碼
    • mailto:郵箱
    • tel:手機(jī)號(hào)
    • id
      herf="#xxx"
<a href="javascript:;"> 查看</a>
↑一個(gè)什么都不做的A標(biāo)簽
  • a 的target的取值(比想象中的要復(fù)雜)
    • 內(nèi)置名字
      target="_top"
      target="_self" (新頁(yè)面在當(dāng)前頁(yè)面打開 )
      target="_parent"
      target="_blank" (在空白頁(yè)面打開)

2、<iframe>標(biāo)簽
作用:內(nèi)嵌窗口,已經(jīng)很少使用了。除了老系統(tǒng)。現(xiàn)在用ajax

3、<table>標(biāo)簽

三個(gè)常用子標(biāo)簽
<thead>
   <tr> //table row 表格里的一行
   <th> // 一行里面的一格
   </tr>
</thead>
<tbody>
</tbody>
<tfoot>
</tfoot>
  • 相關(guān)的樣式
    table-layout
    border-collapse
    border-spacing

4、<img>標(biāo)簽

  • 作用:插入圖片
  • 屬性
    • alt
    • height
    • width
    • src
  • 事件
    • onload
    • onerror
      作用:監(jiān)聽圖片是否加載成功
  • 響應(yīng)式(重要?。。?br> max-width:100% //自適應(yīng)所有屏幕大小

5、<form>標(biāo)簽

  • 作用:發(fā)get火post請(qǐng)求,然后刷新頁(yè)面。
  • 屬性
    • action
    • method
    • autocomplete 自動(dòng)填充
    • target

6、<input>標(biāo)簽

  • 作用:讓用戶輸入內(nèi)容
  • 屬性
    • 類型 type:button/checkbox/email/flie/hidden.....
    • 其他 name/autofocus/checked/disabled/....
  • 事件
    • onchange/onfocus/onblur
  • 驗(yàn)證器
    • html新增功能
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

友情鏈接更多精彩內(nèi)容