naigo 2011-07-08 17:39:26 4193次浏览 0条回复 0 0 0

我在layout的试图里用

Yii::app()->clientScript->registerScript('closeChatWindow', "
$('#closeChatWindow').click(function() {
  $.post('".Yii::app()->createUrl('site/logout')."',function(msg){
    if(msg == 'op'){
      win = window.open('/im-backend/operator/op.html','listwindow','height=600,width=290,top=100,min-height:500px,min-width:290px,left=1024,toolbar=no,menubar=no,scrollbars=no,resizable=yes,status=yes');
    }
  });
}); 
");

以为返回值不是'op'的话会执行$this->redirect(Yii::app()->createUrl('site/login'));弹到登录页面,但是没有动,刷新之后到了登出页面,alert()了下,发现返回了整个登录页面的html代码,怎么能自动跳转过去?还是我ajax方法用错了?

    没有找到数据。
您需要登录后才可以回复。登录 | 立即注册