2018-01-09 23:23
你的ajax写得有问题的呢,传入content值都没有相应的键值对,那么你用getPara()当然是拿不到值的,正确的写法:
$.ajax({
url: "/news/saveNews",
data::{"content":content},
success: function(data){
console.log(data);
}
});
后台获取:String content = getPara("content");
或
$.ajax({
url: "/news/saveNews/"+content,
success: function(data){
console.log(data);
}
});
后台获取:String content = getPara(0);