第3天 HTML5标准提供了哪些新的API?
作者:互联网
- 两个选择器API
document.querySelector()
document.querySelectAll()
- 地理定位API
getCurrrentPosition()
- 多媒体API
<video></video>
<audio></audio>
- 拖放
<div ondrop="drop(event)" ondragover="allowDrop(event)"></div>
<div draggable="true" ondragstart="drag(event)"></div>
- 文件
window.requestFileSystem()
- XHR2
var xhr = new XMLHttpRequest();
xhr.open(“POST”,"@Url.Action(“Upload”)")
- 本地存储API
localStorage sessionStorage
- canvas
<canvas id="myCanvas" width="200" height="100">
- svg
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red" />
</svg>
标签:XHR2,哪些,xhr,API,HTML5,document,选择器,拖放 来源: https://blog.csdn.net/qq_36529240/article/details/121634650