国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

hta(vbs)列目錄樹代碼

2024-08-26 00:15:44
字體:
來源:轉載
供稿:網友

代碼如下:
<html>
<head>
<title>磁盤管理器</title>
</head>
<body>
<div id="DivList"></div>
<script language="vbscript">
Sub List(sPath)
sPath = Replace(sPath, "*", " ")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set c_drive = FSO.GetFolder(sPath)
Set c_files = c_drive.Files
Set c_folder = c_drive.SubFolders
sHTML = "<table width='100%' border='1' cellspacing='0' cellpadding='0'>"
For Each a In c_files
sHTML = sHTML & "<tr><td>"
sBPath = a.Path
sHTML = sHTML & a.Path
sHTML = sHTML & "<br /></td></tr>"
Next
sHTML = sHTML & "</table>"
Document.getElementById("DivList").innerHTML = sHTML
For Each b In c_folder
sHTML = sHTML & "<tr><td>"
sBPath = b.Path
sBPath = Replace(sBPath, " ", "*")
sBPath = Replace(sBPath, "/", "http://")
sHTML = sHTML & "<a href=# onclick=vbs:List(""" & sBPath & """)>" & b.Path & "</a>"
sHTML = sHTML & "<br /></td></tr>"
Next
sHTML = sHTML & "</table>"
Document.getElementById("DivList").innerHTML = sHTML
End Sub
strComputer = "."
Set wbemServices = Getobject("winmgmts://" & strComputer)
Set wbemObjectSet=wbemServices.execquery("select name from Win32_PerfRawData_PerfDisk_LogicalDisk")
For Each mo In wbemObjectSet
if InstrRev(mo.name,":", -1, 0)>0 then
document.write "<input type=button value="&mo.name&" onclick=list('"&mo.name&"/"&"')>"
end if
Next
</script>
</body>
</html>

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 洪湖市| 嘉义县| 夏津县| 深圳市| 元江| 井研县| 微山县| 永平县| 凌海市| 广安市| 丰县| 运城市| 北辰区| 垦利县| 海伦市| 泰宁县| 白城市| 台中县| 仁怀市| 阿城市| 华阴市| 海口市| 福海县| 庆元县| 九江市| 望城县| 若羌县| 莎车县| 平谷区| 栾城县| 博乐市| 东方市| 阿鲁科尔沁旗| 万全县| 乌兰县| 望江县| 青海省| 甘泉县| 成都市| 临潭县| 天台县|