【发布时间】:2023-04-06 07:45:01
【问题描述】:
我有一个 select_tag,它在更改时会使用 onchange 调用 javascript 方法。
我希望将在 select_tag 中选择的选项的值作为参数发送给方法。
<%= link_to_function select_tag :search_type, options_for_select(search_type_options, @search_type), :onchange => "showSearchables( **the option selected ** );return false;" %>
【问题讨论】:
标签: javascript ruby-on-rails onchange html-select