我想知道是否有人在不使用原型(prototype)的情况下开发了像 Grails 2.0.1 中的 Country 和 State 这样的依赖项下拉列表。欣赏代码片段
最佳答案
您可以只使用 remotefunction 和 g:Select,例如
<g:select
onchange="${remoteFunction(
controller:'example',
action:'country',
update:'state',
params:'\'country=\'+$(\'#country\').val()' }"
name="country" ... />
http://alexduan.com/2011/02/17/grails-jquery-and-ajax/
关于Grails 2.0.1 依赖下拉列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9698069/