Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
相关 ID 的 html 代码是:
<input id="fileImage" value="test" name="fileImage[]" type="file" multiple="true" onchange="enableUpload()" />
jQuery 的重点是:
$("#fileImage").focus();
这会在浏览器中生成:
我希望只有“选择文件”按钮作为焦点,而不是按钮右侧的“未选择文件”文本。
有什么方法可以以某种简单的方式做到这一点?