yii2中textarea中的默认值设置

1. view中显示文本域的位置

<?= $form->field($goods_model, 'goods_introduce')->textArea(['class'=>'intr','rows'=>3]) ?>

2.要在该文本域中添加默认值,需要在view中设置,不能使用value="",textarea本身没有value属性设置

$goods_model->goods_introduce='aaa';

最后,aaa将显示在文本域中作为默认值

上一篇:python添加fluent日志记录


下一篇:python基础09_字符串格式化