解决谷歌浏览器再上传相同文件时不可用

competition
linhk 11 years ago
parent f173db4c9d
commit 0c00754057

@ -12,8 +12,16 @@
<% end %> <% end %>
<% end %> <% end %>
</span> </span>
<script type='text/javascript'>
function CompatibleSend()
{
var obj=document.getElementById("_file");
var file= $(obj).clone();
file.click();
}
</script>
<span class="add_attachment"> <span class="add_attachment">
<%= button_tag "浏览", :type=>"button", :onclick=>"_file.click()" %> <%= button_tag "浏览", :type=>"button", :onclick=>"CompatibleSend();" %>
<!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%--> <!--%= link_to image_tag(),"javascript:void(0)", :onclick => "_file.click()"%-->
<%= file_field_tag 'attachments[dummy][file]', <%= file_field_tag 'attachments[dummy][file]',
:id => '_file', :id => '_file',

Loading…
Cancel
Save