Home > php教程 > php手册 > body text

thinkphp中在编辑一条数据时不用JS实现自动选中下拉框_PHP教程_编程技术

WBOY
Release: 2016-06-20 12:33:04
Original
1213 people have browsed it

<select name="auth_pid" id="auth_pid">
     <option value="0" >--请选择--</option>
     <volist name="auth_list" id="item">
          <eq name="item.auth_id" value="$auth_info.auth_pid">
              <option value="<{$item.auth_id}>" selected ><{$item.auth_name}></option>
            <else />
               <option value="<{$item.auth_id}>" ><{$item.auth_name}></option>
           </eq>
       </volist>
</select>
Copy after login

*红色字:需要用来固定比对的那个值

*蓝色字:循环出来的每条记录的需要用来比对的值



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 Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template