17 lines
217 B
Markdown
17 lines
217 B
Markdown
|
# xhr
|
||
|
|
||
|
var xhr = new XMLHttpRequest()
|
||
|
|
||
|
xhr.open(method,"url,是否同步)
|
||
|
|
||
|
xhr.open(body)
|
||
|
|
||
|
|
||
|
|
||
|
```javascript
|
||
|
xhr.open("get","url",false)
|
||
|
xhr.send(null)
|
||
|
// xhr.status 状态码
|
||
|
// xhr.responseText 后台返回内容
|
||
|
|
||
|
```
|