ajax传过来的值,后台接收不到

浏览:913 发布日期:2017/11/13 分类:求助交流
function change(id){
alert(id);
$.ajax({
type:"POST",
dataType:"text",
data:{"typeId":id},
url:'__CONTROLLER__/index/',//目标地址
success:function(){
$("#" + id).css("background","red");
},
})
}


public function entert(){
$entert =D('entert');
$typeId = $_POST['typeId'];
echo $typeId;
if(I('typeId')!=''){
$date['typeId'] =I('typeId');
$enterts=$entert->where($date)->select();
$this->assign('enterts',$enterts);
}else{
$enterts=$entert->select();
$this->assign('enterts',$enterts);
}
}
最佳答案
评论( 相关
后面还有条评论,点击查看>>