日期:2014-05-17  浏览次数:20571 次

html file 按钮更改显示文字问题

在做上传时,file 按钮在部分浏览器下显示的是英文 "submit..."

通过程序把显示文字替换成了预想的。但测试时发现只能在 fiefox 浏览器正常运行。在 IE,chrome等浏览器下有安全方面的限制不能正常提交表单。

替换程序如下:

 

      <input type="file"  name="attachment" id="attachment" style="display:none;width:268px; *height:22px;" onchange="jQuery('#path').val(jQuery('#attachment').val())" />
      <input type="text" name="path" id="path" onfocus="jQuery('#attachment').click()" />
      <input type="button" value="提交" onclick="jQuery('#attachment').click()" />