'Button id'))"."/> 'Button id'))".">
Home > Article > PHP Framework > How to add id to yii button
Yii method of adding id: first determine whether the CHtml class is used; then directly write the attributes and the values corresponding to the attributes in the array behind. The statement is "CHtml::button("test ",array('id'=>'Button id'))".
yii button to add id
If you use the CHtml class, write the attributes directly in the array behind, already The value corresponding to the attribute can
eg: CHtml::button("test",array('id'=>'Button's id'))
Recommended: " yii tutorial》
The above is the detailed content of How to add id to yii button. For more information, please follow other related articles on the PHP Chinese website!