我需要根据JSP中的区域设置更改“浏览”按钮文本。 (例如俄语,葡萄牙语)为Spring为基础的项目。如何更改“浏览”按钮文本
以下为浏览按钮
<td><input type="file" id="file" name="fileName"/></td>
目前执行正如我知道我们不能改变输入类型的文件文本。这是浏览器中浏览按钮的默认行为。
我尝试以下解决方案
<input type="button" id="button" value="Browse"/>
<input type="file" id="fileName" style="opacity:0; position:relative; left:-40px;" onchange="javascript: document.getElementById ('fileName').value = this.value"/>
但上面一个是给安全问题在浏览器中。
<input type="file" name="filename" id="filename-input" value="browse" size="18" style="float: right; width: 250px;">
谁能帮我解决此问题:
在https://stackoverflow.com/它(使用输入型文件改变文本的浏览按钮),具有这种理想的解决方案问题或实现上述解决方案的方式(https://stackoverflow.com/文件上传)。
它给什么样的安全问题? – Jaiwo99
[如何更改?](https://stackoverflow.com/questions/1944267/how-to-change-the-button-text-of-输入型文件) – Bae