$.getJSON(base_url+"search/ajax_get_results", params, function( data ) {
$.each( data, function( key, val ) {
alert(key+' : '+val);return false;
});
}).error( function( xhr, status, error ) {
console.log( error );
});
我用过,
header('Content-type: text/html; charset=utf-8');
header("Content-Type: application/json; charset=utf-8");
但是,不适合我。