<span onclick="ses();">click me</span>
function ses(){
//alert('ass');
var myzz='djjdjdjd';
var mycc='jdjdjdjdjdj';
$.ajax({
type:'post',
url:'index.php?m=Index&a=mmm',
dataType:'JSON',
data:'myphoebe='+myzz+'&mycc='+mycc,
success:function(data){
alert('成功');
}
});
}在IndexAction.class.php中function mmm(){
echo '<script>alert(111)</script>';
echo '<script>alert($myzz)</script>';
$mycc=$this->_post('mycc');
$this->assign('myzz',$myzz);
$this->assign('mycc',$mycc);
}为什么点击没有警告弹出?2:$mycc=$this->_post('mycc'); 跟 $mycc=$_POST['mycc'];是不是一样?
3.ajax 成功的回调函数数据是什么意思?
最佳答案