How do you open Windows Explorer (Windows+E) through Javascript?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
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
Another way to open folder in web browser is:
mypc: your computer name myfolder: folder you want to open
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:/
.