Maison  >  Article  >  développement back-end  >  关于select上拉框 编辑信息时自动选中的有关问题 (smarty模板中)

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

WBOY
WBOYoriginal
2016-06-13 13:08:32960parcourir

关于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>



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

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

--> selected="selected"  

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

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

这样试试看
------解决方案--------------------
smarty 对 select 标记提供有专门的方法,你应该先看手册!
------解决方案--------------------
也可以在php里面组成以后,在页面上显示!
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn