0.0.1 • Published 8 years ago

K--Ajax v0.0.1

Weekly downloads
13
License
MIT
Repository
github
Last release
8 years ago

K-Ajax

image

Build Status npm version Downloads License

Hope is the most useful you used js library of the ajax

  • Small: Size as small as possible
  • Easy: Api as simple as possible

Examples

    //k_ajax.xxx(url,data,success,error,isAsync)

    k_ajax.getJSON('http://qiniu.404mzk.com/example.json',{},function(result){
        document.getElementById('get').innerHTML = result
    })
    k_ajax.getJSONP('http://inner.journey.404mzk.com/jsonp_demo',{},function(result){
        document.getElementById('jsonp').innerHTML = JSON.stringify(result)
    })

    k_ajax.post('http://qiniu.404mzk.com/example.json',{},function(result){
         document.getElementById('post').innerHTML = result
    })
    k_ajax.useImg('http://qiniu.404mzk.com/example.json',{'hello': 'k'})

Installation

<script src="http://qiniu.404mzk.com/K-Ajax_0.0.1.js"></script>

And it's just as easy with npm:

npm i --save npm install K--Ajax