Cjuibutton Display button, Cjuibutton can be either as a submit button or as a normal button.
The basic usage of the button is as follows:
Widget (' Zii.widgets.jui.CJuiButton ', Array (' buttontype ' = ' submit ', ' name ' = ' btnsubmit ', ' value ' = ' 1 ', ' Caption ' = ' + ' Submit ', ' htmloptions ' =>array (' class ' = ' ui-button-primary '));? >widget (' Zii.widgets.jui.CJuiButton ', Array (' buttontype ' = ' button ', ' name ' = ' = ' Btnclick ', ' caption ' = ' Click ',//' Options ' =>array (' icons ' = ' js:{primary: ' Ui-icon-newwin '} '), ' onclick ' = ' js:function ' () {alert ("clicked"); This.blur (); return false;} ',)); >widget (' Zii.widgets.jui.CJuiButton ', Array (' buttontype ' = ' link ', ' name ' = ' Btngo ', ' Caption ' = ' Go ',//' Options ' =>array (' icons ' = ' js:{secondary: ' Ui-icon-extlink '} '), ' url ' =>array (' site/ Other '));?>
These three buttons, the first as a Submit button, the second as a normal button, triggering JavaScripts event, the third click after the trigger Otheraction method.
The results appear as follows:
You can add a CSS file for the Jui UI component, which can be set through a configuration file:
' Components ' =>array (' clientscript ' = = Array (' scriptmap ' = = Array (' jquery-ui.css ' = dirname ($_server[') Script_name ']). ' /css/jui/custom/jquery-ui.css ',),),
Here we copy the jquery css file used by Yiiplayground, using the new CSS style to display as follows:
The above is the PHP Development Framework Yii Framework Tutorial (zii)-button sample content, more relevant content please focus on topic.alibabacloud.com (www.php.cn)!