ajax

$.post("head.php","chatid:"+chatid+"&chatlast:"+chatlast,function(data){});
$.post("head.php",{"chatid":chatid,"chatlast":chatlast},function(data){});

 


$("a").on("click",function(){
  var href=$(this).attr("href");
  $(this).attr("href",href + "?" + "chatid=" + 1 + "&chatlast=" + 2);
})

 

 $("a").on("click",function() {       
        $.post(url, function (data) {
           $(this).attr("href", url + "?" + "chatid=" + chatid + "&chatlast=" + chatlast);
        })
    }
//ajax向后台传递数组(转)
$.ajax({
    traditional: true//这个设置为true,data:{"steps":["qwe","asd","zxc"]}会转换成steps=qwe&steps=asd&...
});

 

posted @ 2016-08-16 16:35  dongxiaolei  阅读(174)  评论(0编辑  收藏  举报