Home > PHP Framework > YII > body text

How to add id to yii button

藏色散人
Release: 2020-07-20 09:12:22
Original
2582 people have browsed it

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!

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