求助 php不能获取jquery.ajax传递的变量值

浏览:1370 发布日期:2015/07/17 分类:求助交流
class HistoryAction extends CommonAction {
public $nowpage = 1;
public function ShowHistory() {
$this->GetData();
$this->display ("History/history");

}
function GetData(){
print_r($_POST);
}
}

$(function() {
$.ajax({
url : tplroot + '/Home/History/GetData',
type : 'post',
async : false,// 改为同步方式
data : {
"test" : "1",
},
success : function() {
alert("成功");
},
error : function() {
alert("失败");
}
});
return false;
});
最佳答案
评论() 相关
后面还有条评论,点击查看>>