'Button id'))"."/> 'Button id'))".">

Home  >  Article  >  PHP Framework  >  How to add id to yii button

How to add id to yii button

藏色散人
藏色散人Original
2020-07-20 09:12:222570browse

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'))".

How to add id to yii button

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!

Statement:
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