jquery 的data格式应为{userId:1},例如:
$.ajax({ url:"你的url", data:{userId:1}, dataType:'json', success:function(res){ }});如果后台还是接受不到参数,那说明你后台接收参数方式不对。
这样传参var id = 1;$.post(url,{user_id:id,name:"张三"},function(data,status){});