juqery ajax

function get(_url, callback){
    $.ajax({
        type: "GET",
        url: _url,
        dataType: "html",
        contentType: "application/x-www-form-urlencoded",
        success: callback,
        async: false
    });
};



function post(_url, param, callback){
    $.ajax({
        type: "POST",
        url: _url,
        dataType: "html",
        contentType: "application/x-www-form-urlencoded",
        data: "cmdStr=" + JSON.stringify(param),
        success: callback
   
    });
   
};

你可能感兴趣的:(html,Ajax,json)