在我的Rails應用程序我創建了一組複選框如下:選擇所有複選框
<div class="form_row">
<label for="features[]">Features:</label>
<% ['scenarios', 'news', 'role_profiles', 'private_messages', 'chatrooms', 'forums', 'polls'].each do |feature| %>
<br><%= check_box_tag 'features[]', feature, (@features || {}).include?(feature) %>
<%= feature.humanize %>
<% end %>
</div>
我想知道如何創建一個按鈕,將「全選」。
請參閱http:// stackoverflow.com/questions/386281/how-to-implement-select-all-check-box-in -html – 2009-05-20 14:16:36