我有一个问题:
我想添加:onchange => “readURL(this)”给我:@H_403_3@
<%= f.input :image,:as => :file,:onchange => "readURL(this)" %>
我尝试过:@H_403_3@
<%= f.input :image,:html => {:onchange => "readURL(this)"} %>
但我在HTML代码中看不到onchange =“readURL(this)”.@H_403_3@
再次感谢你:D.@H_403_3@
解决方法
修复:
<%= f.input :image,:input_html => {:onchange => "readURL(this)"} %>
谢谢Carlos Antonio da Silva.@H_403_3@
http://groups.google.com/group/plataformatec-simpleform/browse_thread/thread/6f2cdd83e2dbf51c@H_403_3@