thinkPHP 模版 select 编辑选中状态判断

来源:互联网 发布:南京新开区网络问政 编辑:程序博客网 时间:2024/05/17 23:48
<select name="rightCategoryID">
             <option value="">选择分类</option>
              <volist name="rightCategoryList" id="vo">
               <eq name="vo.rightCategoryID" value="$r.rightCategoryID">
                   <option value="{$vo.rightCategoryID}" selected >{$vo.name}</option>
                <else />
                   <option value="{$vo.rightCategoryID}" >{$vo.name}</option>
               </eq> 
            </volist> 
 </select>