An open API service indexing awesome lists of open source software.

https://github.com/ch563/ajax

ajax封装
https://github.com/ch563/ajax

ajax

Last synced: 6 months ago
JSON representation

ajax封装

Awesome Lists containing this project

README

          

# Ajax原生方法封装

运行示例
```javascript
sendAjax({
url: 'url',
type: 'GET',
data: {
name: 'name',
age: '23'
},
dataType: 'json',
async: false,
success: function (res) {
console.log(res)
},
fail: function (err, status) {
console.log(err)
console.log('状态码为:' + status)
}
})
```