在HAML中选择列表(下拉列表) [英] Select list (dropdown) in HAML
本文介绍了在HAML中选择列表(下拉列表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法在HAML中生成传统的HTML下拉框.我正在使用Yii HAML扩展程序,因此我确定它是否特别适用于该功能.
I'm having trouble producing a traditional HTML dropdown box in HAML. I'm using the Yii HAML extension, so I'm sure if its a quirk with that specifically.
这是我正在使用的HAML ...
This is the HAML I'm using ...
%select
%option one
%option two
%option three
这是我要获取的HTML输出...
This is the HTML output I'm trying to get ...
<select>
<option>one</option>
<option>two</option>
<option>three</option>
</select>
推荐答案
您的缩进量减少了一个空格.这是两个空格,而不是三个.
Your indent is off by one space. It's two spaces, not three.
%select
%option one
%option two
%option three
这篇关于在HAML中选择列表(下拉列表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文