XMLHttpRequest 发起 GET 请求
1.创建xhr对象
2.调用xhr.open(`请求方式`,`接口地址`)函数
3.调用xhr.send(post请求的参数)函数
4.监听load事件
序列化:真实数据转换为字符串格式。JSON.parse()
反序列化:字符串格式转换为真实数据。JSON.stringify()
原生ajax
.toString():
new URLSearchParams(data):
JSON.stringify();:
JSON.parse():
URL.createObjectURL(file):
XMLHttpRequest():
xha.addEventListener():