How to open Windows Explorer (Windows+E) using Jav

2019-07-03 04:37发布

How do you open Windows Explorer (Windows+E) through Javascript?

2条回答
Viruses.
2楼-- · 2019-07-03 05:30

window.open wont work for local path or network path on modern browsers, you need to turn your path to URL like c:\data to file:///C:/Data/ or you can use HTML5 feature like below

<pre>
input type="file" name="itemImagePath" 
</pre>

Another way to open folder in web browser is:

<pre>
<a href="\\mypc\c:\myfolder">Open folder</a>
</pre>

mypc: your computer name myfolder: folder you want to open

查看更多
Juvenile、少年°
3楼-- · 2019-07-03 05:44

You cannot open Windows Explorer through JavaScript because modern web browsers are locked down to offer virtually zero access to the client user's hard drive. An unpatched version of Internet Explorer 6.0 could have accessed Windows Explorer by browsing in a new window to file://c:/.

查看更多
登录 后发表回答