您好如何设置此下拉菜单以使列表中的默认值为秒?这是dropmenu
<g:select name="dropmenu" from="${["First", "Second", "Third"]}"
/>
答案 0 :(得分:0)
<g:select selected="Second" name="dropmenu" from="${["First", "Second", "Third"]}"
/>
答案 1 :(得分:0)
您缺少value =属性。下面的示例还显示了值为null时的noSelection选项。
<g:select id="initialOutcome" name="initialOutcome.id" optionKey="id" from="${OutcomeDescription.findAll())}"
value="${outcome?.initialOutcome?.id}" noSelection="['':'-Select-']" class="form-control" title="Initial Outcome" required=""/>