The example in this article describes the usage of Yii framework pop-up window component CJuiDialog. Share it with everyone for your reference, the details are as follows:
CJuiDialog component is under the manual zii.widgets.jui
Use the following code under the view
$this->beginWidget('zii.widgets.jui.CJuiDialog', array( 'id'=>'mydialog',//弹窗ID // additional javascript options for the dialog plugin 'options'=>array(//传递给JUI插件的参数 'title'=>'弹窗标题', 'autoOpen'=>false,//是否自动打开 'width'=>'auto',//宽度 'height'=>'auto',//高度 'buttons'=>array( '关闭'=>'js:function(){ $(this).dialog("close");}', ), ), )); echo 'dialog content here'; $this->endWidget('zii.widgets.jui.CJuiDialog'); // 这是弹窗链接, echo CHtml::link('open dialog', '#', array( 'onclick'=>'$("#mydialog").dialog("open"); return false;',//点击打开弹窗 ));
I hope this article will help you design PHP programs based on the Yii framework.
For more articles related to usage analysis of the Yii framework pop-up window component CJuiDialog, please pay attention to the PHP Chinese website!