1、form加入HTML属性
<%= form_for(@device, :html => {:method=>"post", :id=>"form1", :name=>"form1", :target=>"__hidden_call"}) do |f| %>
<% form_for :person, @person, :url => { :action => "update" } %>
2、link_to
<%= link_to "Issues", {:controller => "issue", :action => "index"}, {:onclick => "alert(1)"} %>
rails表单控件helper
时间: 2024-10-27 12:35:49