Js operation IE browser pop-up browsing folder, jsie browser pop-up
:
You can return the directory path.
The procedure is as follows:
Function BrowseFolder () {try {var Message = "select folder"; // The selection box prompts var Shell = new ActiveXObject ("Shell. application "); var Folder = Shell. browseForFolder (0, Message, 0 x, 0x11); // start Directory: My computer // var Folder = Shell. browseForFolder (0, Message, 0); // The starting directory is: desktop if (Folder! = Null) {Folder = Folder. items (); // returns the FolderItems object Folder = Folder. item (); // returns the Folderitem object Folder = Folder. path; // return Path if (Folder. charAt (Folder. length-1 )! = "\") {Folder = Folder + "\";} return Folder;} return null;} catch (e) {alert ("enable AcitveX control related options in iesettings. "); Return null ;}}
Var Folder = BrowseFolder ();
Here, this Folder is the path returned after the selected directory is determined.
Assume that I selected the works directory of the E drive, the returned value is E: \ works \
Note: Sometimes you may be prompted that you do not have the permission or the like. Because it is a client js operation, you need to enable some ActiveX options in the security customization of internet Options.
Why does IE browser automatically pop up when any folder is opened?
Or the Registry has been maliciously modified,
(1) anti-virus software is available for antivirus purposes! Or press CTRL + ALT + DEL to bring up the WINDOWS Task Manager, stop the suspicious process, and then manually delete the virus file (you need to remove the suspicious start item and restart it before deleting it, or delete it in security mode ),
(2) Run MSCONFIG again to Remove useless random auto-start items. In fact, the auto-start items are useless, as long as one input method is retained (ctfmon ).
How can I use js to control the pop-up window to open it in IE?
In Linux, what should I do without IE?