[Yii Framework] CJuiDialog如何定义按钮

<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(
'id'=>'myJuiDialog',
'options'=>array(
'title'=>'Edit the user profile',
'autoOpen'=>false,
'buttons'=>array(
'ok'=>"js:function(){jQuery(this).dialog('close');}"
),
),
));
?>
<?php $this->endWidget('zii.widgets.jui.CJuiDialog');?>

注意红色字部分,记得加上“js:”就可以了!

原文地址:https://www.cnblogs.com/davidhhuan/p/1717076.html