a 标签的用法
- 属性
- href
- 网址
- https://
- http://
- //google.com
- 路径
- 绝对路径 /a/b/c
- 相对路径 a/b/c
- 伪协议
- javascript:;
- mailto:
- tel:
- id
- href=#
- target
- 内置名字
- _blank
- _top
- _parent
- _self
- 程序员命名
- window的name
- iframe的name
- download
- rel=noopener
- 作用
- 跳转外部页面
- 跳转内部锚点
- 跳转到邮箱、电话
table 标签的用法
-
标签
table,thead,tbody,tfoot,tr,td,th
-
样式
- table-layout
- border-collapse
- border-spacing
img 标签的用法
-
作用
发出get请求,展示一张图片
-
属性
alt,height,width,src
-
事件
onload,onerror
-
响应式
max-width:100%
-
可替换元素
form 标签的用法
-
作用
发出get或post请求,刷新页面
-
属性
action,autocomplete,method,target
-
事件
onsubmit
input 标签的用法
-
作用
让用户输入内容
-
属性
-
类型type:button,checkbox,email,file,hidden,number, password,radio,search,submit,tel,text
-
其他name:autofocus,checked,disabled,maxlength, pattern,value,placeholder
-
-
事件
onchange,onfocus,onblur
-
验证器
HTML5新增功能
-
注意事项
- 一般不监听input的click事件
- form里面的input要有name
- form里要放一个type=submit才能触发submit事件