我正在使用 link_to_remote 逐一回答测验。我想要选中的单选按钮。但是当我单击按钮并单击下一步时它没有改变,微调器仅加载
<div class = "y">
<% form_for @answer do |f|%>
<div class = "label_field_pair">
<label for "questions">
<%= @ans.ques %>
</label>
</div> <br>
<div class = "label_field_pair2">
<label for "options">
<div id = "option-1">
<%= radio_button_tag :answer, :ans1%><%= @ans.ans1 %>
</div><br>
<div id = "option-2">
<%= radio_button_tag :answer, :ans2%><%= @ans.ans2 %>
</div><br>
<div id = "option-3">
<%= radio_button_tag :answer, :ans3%><%= @ans.ans3 %>
</div><br>
<div id = "option-4">
<%= radio_button_tag :answer, :ans4%><%= @ans.ans4 %>
</div><br>
</label>
</div>
<%= link_to_remote "Next",
:before => "Element.show('loader')",
:success => "Element.hide('loader')",
:url=>{:controller=>"answers", :action=>"next"},
:with => "'answer='+$F(answer)+'&passed_question=#{@ans.id}&'+'&exam_group_id=#{@exam_group.id}&'"
%>
</div>
<% end %>
</div>
因为我想在 :with 声明中获取选中单选按钮的值...提前谢谢请帮帮我