Usage analysis of Yii framework pop-up window component CJuiDialog

高洛峰
Release: 2023-03-04 17:26:01
Original
1324 people have browsed it

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;',//点击打开弹窗
));
Copy after login

Usage analysis of Yii framework pop-up window component CJuiDialog

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!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template