<sc
$(function() {
$("#save").click(function(){
$.ajax({
cache: false,
type: "POST",
dataType : "json",
url : '{:U("Portal/Employees/a1_hand")}',
data: {id : 1},
success: function(msg){
$("#show").append(msg);
}
});
});
});
</sc
php-处理代码:
public function a1_hand(){
$id=$_POST['id'];
$asd=M('student');
$DemoArry=$asd->where('a_id='.$id)->select();
$this->ajaxReturn($DemoArry,'JSON');
}
html -页面代码:
<div id="show">
???怎么接收呢?
</div>
最佳答案