jQuery.ajax({
type:'post', 提交方式
url:'/aps/exa/sample/AjaxCheck.do', 提交的路径
contentType:'json', 返回值的类型
data:{'exap_ttl',inputValue}, 需要过去的值
success:function(data,textStatus){
var content = data.result.count.cnt;
这里的data是js中的,result是map返回的service层的返回结果,count
是map中的key值,cnt是sql中的别名
},
error是当发生错误的时候执行的部分。
error:function(data,textStatus,errorThrow){
alert("ajax-errror");
}
});