打开对话框表单上传时如何设置默认文件夹

时间:2019-05-03 07:25:02

标签: javascript html

打开对话框上载对话框时如何设置默认文件夹

例如:

我要设置默认\ 192.168.1.100

enter image description here

在html上,我设置

  

<input type="file" class=" form-control text-right " value="\\192.168.1.100\Sharing" accept=".csv" directory="\\192.168.1.100\Sharing" id="upload_file">

但是它不起作用

1 个答案:

答案 0 :(得分:1)

您无法做到,这存在安全隐患。

此外,您永远不能确定目录是否存在。

如果您尝试显示路径,它将为C:\\fakepath\\