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;
});
最佳答案