请教ajax运行环境
安装了phpstudy,ajax语句没作用
代码如下:
loader: function(param, success, error) {
var q = param.q || ''; //获取用户输入的值,如果用户没有输入就返回一个空值
if (q.length < 1) {
return false;
}
$.ajax({
url: 'http://127.0.0.1/easyui/example/c2/server/filterCountry.php?q=' + q,
dataType: 'json',
type: 'get',
success: function(data) {
success(data);
},
error: function() {
error();
}
});
},