Home > Backend Development > PHP Tutorial > Automatically select the drop-down box without using JS when editing a piece of data in thinkphp_PHP Tutorial

Automatically select the drop-down box without using JS when editing a piece of data in thinkphp_PHP Tutorial

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-12 09:03:55
Original
930 people have browsed it

In thinkphp, when editing a piece of data, the drop-down box is automatically selected without using JS

<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

*Red text: The value that needs to be used to fix the comparison
*Blue text: The value of each record looped out that needs to be compared

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1076510.htmlTechArticlethinkphp does not need JS to automatically select the drop-down box when editing a piece of data select name=auth_pid id=auth_pid option value= 0 --Please select--/option volist name=auth_list id=item eq name=it...
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
Latest Issues
用phpstorm
From 1970-01-01 08:00:00
0
0
0
Why did the teacher’s submission fail?
From 1970-01-01 08:00:00
0
0
0
composer installation failed
From 1970-01-01 08:00:00
0
0
0
angular.js - angularJS ng-style用法
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template