ajax使用

jquery中的ajax方法参数

url:发送请求的地址,String类型的参数
type:请求方式(post,get),默认为get,String类型的参数
dataType:服务器返回的类型,返回的类型有xml html json text script
success:请求成功后调用的参数
error:请求失败返回的调用的参数


例:
function shops(){

  $.ajax({
    type: 'POST',
    dataType:'json',
    url : "tsxt.do",
    success: function(r){
      alert("ok");

}
});

}

posted @ 2016-09-12 09:44  何以笙箫默、  阅读(162)  评论(0编辑  收藏  举报