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> //不可,不写协议则为相对路径
<a href="//qq.com"></a> //使用当前文件所用协议 file://qq.com
<a href="http://qq.com"></a> //可访问qq.com
2.相对路径,#,?
3.伪协议javascript:;点击a什么也不做/javascript:alert('123')点击a执行:后面的js;
form
a标签 发get请求
form标签 发post请求
target属性和a标签一样
method属性
method=“post”
action属性
相当于a标签的href,表示请求响应的页面
input
无子元素
type属性
1.text 文本输入框
2.password 密码输入框
3.radio 单选框
多个选项的name相同则可实现单选
4.checkbox 多选框
选项内容写在input标签后面
若需要点击选项内容也可选中该项,可用label绑定,其他类型也可这样做。
<input type="checkbox" id="xxx"><label for="xxx"></label>
//或
<label><input type="checkbox"></label>
button标签若不指定type将自动被指定为submit类型,可有子元素
select
name属性
下拉单选框,name提交的参数值为选中的选项的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
居然可以实现横向表格
<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>