Home > Backend Development > PHP Tutorial > 关于select上拉框 编辑信息时自动选中的有关问题 (smarty模板中)

关于select上拉框 编辑信息时自动选中的有关问题 (smarty模板中)

WBOY
Release: 2016-06-13 13:08:32
Original
1010 people have browsed it

关于select下拉框 编辑信息时自动选中的问题 (smarty模板中)

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
<select>

<option value="<% $array_ab[sec].vab_id %>"> selected="selected"   >  </option>

</select>

Copy after login


我在编辑页面的select中加了这样一段判断代码
PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--> selected="selected"  
Copy after login

但是不起作用不知道为什么 是不是写法上存在问题 用的是smarty
还望高手解答

------解决方案--------------------
selected="selected"

这样试试看
------解决方案--------------------
smarty 对 select 标记提供有专门的方法,你应该先看手册!
------解决方案--------------------
也可以在php里面组成以后,在页面上显示!
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template