无标题文章

Canvas

SVG

地理定位

navigator.geolocation

getCurrentPosition(success, error, options)

watchPostion(success, error, options)

clearWatch()

postion

timestamp

coords

latitude

longitude

altitude

heading

speed

error

选项

多媒体API

拖放

属性

draggable tue/false

事件

dragenter

dragleave

dragover

drop

dragstart

dragend

drag

dragEvent

dataTransfer

setData()

getData()

文件API

文件上传

multiple 设置给input,实现多文件

accept 设置允许的文件类型accept="image/*"

FileList 对象

File对象组成的集合

类数组对象

获取FileList对象, 通过 inputElement.files

File 对象

name 属性 文件名

size 属性 文件大小

type 属性 文件类型

lastModified 属性 最后修改时间

lastModifiedDate 属性 最后修改时间

FileReader 对象

构造函数

FileReader()

属性

result 结果

readyState

方法

abort() 中断

readAsDataURL(file) 读取为base64

readAsText(file) 读取为文本

事件

onload 读取成功后出发

onabort 中断时触发

onerror 读取错误时触发

loadstart 开始读取时触发

loadend 读取结束时触发(不论成功/失败)

progress 在读取过程中触发

FormData

构造函数

FormData([formElement])

方法

append(key, value)

delete(key)

set(key, value)

get(key)

keys()

....

XMLHttpRequest Level2

属性

responseText

responseXML

readyState

status HTTP状态

timeout 超时时间

方法

open()

send()

abort()

事件

readstatechange

error 新增 请求失败触发

timeout 新增 请求超时时触发

abort 新增 请求中断时触发

load 新增 请求成功时触发

loadstart 新增 请求开始时触发

loadend 新增 请求结束时, 不论成功/失败

progress 新增 请求响应过程中,多次触发

ProgressEvent

total 下载的总数

loaded 当前下载的数

XMLHttpRequestUpload

load 事件

loadstart 事件

loadend 事件

timeout 事件

abort 事件

error

progress 事件

你可能感兴趣的:(无标题文章)