The CHtmlButton is a widget in Yii Framework 1 and it creates an HTML button element that can be styled and used to perform an action.
Example 1: Displaying a simple button
This code will display a button with the label "Click me!".
Example 2: Adding a CSS style to the button
'my-btn-class')); ?>
This code will display a button with the label "Click me!" and a class attribute "my-btn-class" that can be styled with CSS.
Example 3: Adding a JavaScript onclick function
"alert('Hello world!');")); ?>
This code will display a button with the label "Click me!" and a onclick attribute that triggers a JavaScript alert with the message "Hello world!".
Package library: Yii Framework 1.
PHP Chtml::button - 2 examples found. These are the top rated real world PHP examples of Chtml::button extracted from open source projects. You can rate examples to help us improve the quality of examples.