我有一個select_tag,它在更改時使用onchange調用javascript方法。如何將所選選項從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;" %>
完美,謝謝:) – Njall 2012-02-06 20:54:56