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.
如图中突出显示的那样,有没有办法在代码中更改窗口的大小?有没有办法以像素为单位指定大小
弹出的对话框是最终用户的原生对话框,而不是 JavaScript 本身的一部分。因此,您实际上无法更改它……至少在 JavaScript 中无法更改。事实上,该对话框的工作方式完全取决于个人浏览器/操作系统的组合。
您可以更改相关的 html 字段的外观和感觉<input type='file'>,仅此而已。对不起。有关样式的更多信息,请查看有关 quirksmode 的教程。
<input type='file'>