1.0.3 • Published 3 years ago
ajaxyjs-1.0.0 v1.0.3
How to use it ?
It is very easy to work with this tiny library.
First you need to import Ajaxy then call the ajaxy method .
Then use the output method and the rest depends on you.
Example :
import Ajaxy from "./ajaxy.js"
// this is just an example
var result = document.querySelector("#result");
var url ="src/info.json"
var ajax = new Ajaxy("get",url,"text")
ajax.output = function(resp){
var datas = JSON.parse(resp)
for(var data of datas.cars){
result.innerHTML += " Brand : "+data.brand+"<br>" +" Year : "+data.year+ "<br>"+" Speed : "+data.speed +"<br><br>"
}
}