Home > Web Front-end > JS Tutorial > body text

js directory enumeration function_javascript skills

WBOY
Release: 2016-05-16 18:58:57
Original
1332 people have browsed it

I haven’t worked on JS for a long time because I’m annoyed by the capitalization in it. In fact, it is similar to vbs, but I think vbs is not widely used after all, haha.

Copy code The code is as follows:

var w=WScript.createObject("wscript.shell" )
w.popup(showFolders("c:\"))
function showFolders(foldername)
{
var fs,f,fc,s;
s=""
fs=new ActiveXObject("Scripting.FIleSystemObject");
f=fs.GetFolder(foldername);
fc=new Enumerator(f.SubFolders);
for(; !fc.atEnd() ; fc.moveNext())
{s =fc.item();
s ="rn"
}
return(s);
}

Save the file directly as do.js. Generally, js is used for web pages. It is best to save such js as do.jse to ensure that it can run.
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template