URL配置:
'urlManager' => array( 'class' => 'application.base.Url', 'urlFormat' => 'path', 'showScriptName' => false, 'rules' => array( ), ),
视图代码:
echo CHtml::ajaxLink('delete', array('/Social/comment/delete', 'id'=>$data->Id, 'type'=>'brief', 'key'=>$data->fkey), array( 'success'=>'function(){ $("#comment-'.$data->Id.'").remove(); }', 'type'=>'POST', ), array( 'id'=>'delete-comment-'.$data->Id, 'confirm'=>'are u sure?', ));
控制器:
public function actionDelete($id,$type,$key) { }