I want to open a local folder from the web application I saw in Internet Explorer 11.

Asked 1 years ago, Updated 1 years ago, 102 views

I use Internet Explorer 11.
When I click a <a> tag, I want to open a folder on the user side PC.
I know Chrome and Firefox can't do this.
I'm trying to find information that Internet Explorer can do, but please let me know if it's difficult.

Enter a description of the image here

Already tried

·Place HTML files such as index.html locally, open them, and click > open tags.
·Register domain > tag click on trusted site with Internet Explorer option, but no response

internet-explorer

2022-09-30 11:28

3 Answers

For security reasons, it is prohibited.If you are restricting it to Internet Explorer, you may be able to create ActiveX controls, install them on that machine, and run them.However, I don't think it's HTML anymore.


2022-09-30 11:28

Chrome experimentally implements the Native File System API.Depending on the function you want to realize, you may be able to use it.


2022-09-30 11:28

Finally, we decided to use ActiveX.
Click the button to open the C:\work folder.

<script type="text/javascript">

    var path="C:\\work";
    path.replace(/\u002f/g, '\\');

    function openExplorer(){
        varopenWorlder='explorer.exe/n, /e, /root, '+path;
        var ActiveXobj=new ActiveXObject("WScript.Shell");
        ActiveXobj.Run(openWorlder);
    }
</script>
<input type="button" value="button" onclick="openExplorer();">

Internet Explorer also requires registration with trusted sites.
Enter a description of the image here

Enable … even if you run the Internet Option > Trusted Sites > Custom Level > script.
Enter a description of the image here


2022-09-30 11:28

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.