Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 grails 选择标签在选择标签选项值中显示为 10、15、20、25
<g:select name="maxpage" from="${10..30}" />
10
15
20
25 . . . 1000
我想以这种格式显示
from只需对属性使用数组:
from
<g:select name="maxpage" from="${[10,15,20,25]}" />
更新:
假设您想在 10 到 1000 之间进行选择,步长为 5,您可以尝试以下操作:
<g:select name="maxpage" from="${(10..1000).step(5)}" />