Home > front end > The react in the project how to open a folder selection box
The react in the project how to open a folder selection box
Time:12-11
The search on the net, mostly new ActiveXObject (" Shell. Application "), but when I open the page in the react program, will be submitted to the ActiveXObject can not find,,, what is the way to open a folder selection box, I just want to choose a folder, a path, for behind me the downloaded file, and bosses, help confused me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
CodePudding user response:
ActiveXObject (" Shell. Application ") is the Internet explorer Only
CodePudding user response:
<body>
Document. QuerySelector (' # b ') addEventListener (' change ', e=& gt; { For (let entry of e. arget. Files) The console. The log (entry. The name, entry. WebkitRelativePath); }); </script>