iframe
frameborder屬性
0 取消邊框
name屬性
嵌入的瀏覽上下文(框架)的名稱。該名稱可以用作a標簽,form標簽的target屬性值,或input標簽和 button標簽的formtaget屬性值。
a
target屬性
a標簽的target的值:
1._blank 新頁面打開
2._self 當前頁面/iframe打開
3._parent 父頁面打開
4._top 頂層父級
download屬性
<a download></a>該鏈接用于下載,等同于設置響應content-type: application/octet-stream
href屬性
可取的值:
1.//qq.com
<a href="qq.com"></a> //不可,不寫協(xié)議則為相對路徑
<a ></a> //使用當前文件所用協(xié)議 file://qq.com
<a ></a> //可訪問qq.com
2.相對路徑,#,?
3.偽協(xié)議javascript:;點擊a什么也不做/javascript:alert('123')點擊a執(zhí)行:后面的js;
form
a標簽 發(fā)get請求
form標簽 發(fā)post請求
target屬性和a標簽一樣
method屬性
method=“post”
action屬性
相當于a標簽的href,表示請求響應的頁面
input
無子元素
type屬性
1.text 文本輸入框
2.password 密碼輸入框
3.radio 單選框
多個選項的name相同則可實現(xiàn)單選
4.checkbox 多選框
選項內容寫在input標簽后面
若需要點擊選項內容也可選中該項,可用label綁定,其他類型也可這樣做。
<input type="checkbox" id="xxx"><label for="xxx"></label>
//或
<label><input type="checkbox"></label>
button標簽若不指定type將自動被指定為submit類型,可有子元素
select
name屬性
下拉單選框,name提交的參數(shù)值為選中的選項的value
<select name="分組" multiple> //multiple多選
<option value=“”>-</option>
<option value=“1”>1</option>
<option value=“2” disabled>2</option> //不可選
<option value=“3” selected>3</option> //默認選中
</select>
textarea
固定的框大小
默認為可變大小
可使用style="resize:none;width:;height:;"設置
其他屬性
cols,rows 可調整框的大小
table
居然可以實現(xiàn)橫向表格
<table>
<thead>
<tr>
<th>表頭</th> //縱向表頭
</tr>
</thead>
<tbody>
<tr>
<th>表頭</th> //橫向表頭
<td>項</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>表頭</th> //橫向表頭
<td>項</td>
</tr>
</tfoot>
<colgroup>
<col width=100 bgcolor=red> //設置表格第一列列寬,背景色為紅色
<col width=100> //設置表格第二列列寬
</colgroup>
</table>