发布网友 发布时间:2022-04-23 03:56
共3个回答
热心网友 时间:2022-04-24 14:43
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>JS</title>
<STYLE>
</STYLE>
<script type="text/javascript">
var fso, f, fc, s, ti;
fso = new ActiveXObject ("Scripting.FileSystemObject");
f = fso.GetFolder ("I:\\2013313workspace\\");
fc = new Enumerator (f.files);
for (; !fc.atEnd (); fc.moveNext ())
{
s = String (fc.item ());
if (!!s.match (/^.*txt$/i))
{
ti = s.substring (s.lastIndexOf ('\\') + 1);
document.write (ti + "<br / >");
}
}
</script>
</head>
<body>
</body>
</html>
热心网友 时间:2022-04-24 16:01
ie试试,别用其他浏览器追问用的就是ie
热心网友 时间:2022-04-24 17:36
txt小写试试