miniAjax
1.0.0
미니 Ajax 라이브러리는 간단한 웹 애플리케이션을 위한 Ajax, jsonp 및 준비된 기능을 제공합니다.
✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
miniAjax에는 Ajax, jsonp 및 Ready 함수를 포함하여 3개의 인터페이스만 있습니다.
ajax ( {
url : "./testXhr.php" , //links to server
type : "POST" , //request method
data : { name : "WeideMo" , age : 26 } , //request params
dataType : "json" , //received dataType
success : function ( response , xml ) {
// do something when success
} ,
fail : function ( status ) {
// do something when fail
}
} ) ;
jsonp ( {
url : "https://github.com/WeideMo/" , //links to server
callback : "callback" , //reception callback name negotiated with the backend-server
data : { id : "1000120" } , //request params
success : function ( json ) {
// do something when success
} ,
fail : function ( ) {
// do something when fail
} ,
time : 10000 //custom timeout
} )
ready ( function ( ) {
// do something when page ready
} )
원래 IE 시리즈를 포함하여 거의 모든 브라우저를 지원합니다.
압축된 버전은 2K 미만이며, gzip을 사용하면 1K 미만이 됩니다.
MiniAjax는 웹 개발을 충족하기 위한 기본 요구 사항일 뿐입니다. Ajax
, jsonp
및 ready
세 가지만 담당합니다.
더 많은 원칙과 사용법을 얻을 수 있습니다 ->https://github.com/WeideMo/jsonp