标签:ted red role for style 注意 div isset bsp
<select name="role_id" id="" class="form-control" required> {volist name="roleData" key="key" id="vo"} <option value="{$vo.id}" {php}if(isset($data[‘role_id‘])){ {/php} {$data[‘role_id‘]==$vo[‘id‘] ? ‘selected‘ : ‘‘}{php}}{/php}>{$vo[‘name‘]}</option> {/volist}
<select name="role_id" id="" class="form-control" required> {volist name="roleData" key="key" id="vo"} {eq name="vo[‘id‘]" value="$data.role_id"} <option value="{$vo[‘id‘]}" selected>{$vo[‘name‘]}</option> {else/} <option value="{$vo[‘id‘]}">{$vo[‘name‘]}</option> {/eq} {/volist} </select>
注意:
select()出来的结果才可以volist
标签:ted red role for style 注意 div isset bsp
原文地址:https://www.cnblogs.com/xiaobiaomei/p/9220777.html