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

首頁 > 編程 > HTML > 正文

XMLDOM下載者生成器代碼(xmldown.hta)

2024-08-26 00:15:43
字體:
來源:轉載
供稿:網友
以下代碼保存成hta文件,可生成js和vbs下載者
代碼如下:
<HTA:APPLICATION
ID="xmldown"
Caption="yes"
SCROLL="auto"
border="none"
borderStyle="static"
SINGLEINSTANCE="yes"
maximizebutton="no"
BORDER="no"
icon="dxdiag.exe">
<script language=vbs>

Sub Window_onLoad
window.resizeTo screen.width/1.6,screen.height/3
window.moveTo 200,200

End Sub

Sub CreateXml(path,File)

Set objStream = CreateObject("ADODB.Stream")
objStream.Type = 1
objStream.Open()
objStream.LoadFromFile(Path)
objStream.position = 0

Set XmlDoc = CreateObject("Microsoft.XMLDOM")
XmlDoc.async = False
Set Root = XmlDoc.createProcessingInstruction("xml", "version='1.0' encoding='UTF-8'")
XmlDoc.appendChild(Root)
XmlDoc.appendChild(XmlDoc.CreateElement("root"))
Set Xfile = XmlDoc.SelectSingleNode("http://root").AppendChild(XmlDoc.CreateElement("file"))
Set Xstream = Xfile.AppendChild(XmlDoc.CreateElement("stream"))
Xstream.SetAttribute "xmlns:dt", "urn:schemas-microsoft-com:datatypes"
Xstream.dataType = "bin.base64"
Xstream.nodeTypedValue = objStream.Read()
XmlDoc.Save(File)
Set XmlDoc = Nothing
Set Root = Nothing
Set objStream=Nothing


End Sub

Function x(obj)
Set x=document.getElementById(obj)
End function

Function Findfile(str)
Set FSO = CreateObject("Scripting.FileSystemObject")
If FSO.FileExists(str) Then
findfile=true
Else
findfile=false
End If
End Function

Function jsdown()
Set FSO = CreateObject("Scripting.FileSystemObject")
with fso.opentextfile((CreateObject("WScript.Shell")).CurrentDirectory&"/jsdown.js",2,true)
.write x("jsdown").value
end with
end function

Function vbsdown()
Set FSO = CreateObject("Scripting.FileSystemObject")
with fso.opentextfile((CreateObject("WScript.Shell")).CurrentDirectory&"/vbsdown.vbs",2,true)
.write x("vbsdown").value
end with
end function
</script>
<body>
<h4>1.生成下載用的xml文件</h4>
選擇下載的exe文件:<input type=file name="file1" id="file1" size="20">
保存路徑 <input type=text name="path" id="pathname" value="c:/down.xml" size="20">
<input type="button" value="生成xml文件" onclick='vbs:CreateXml x("file1").value,x("pathname").value:If Findfile(x("pathname").value) = true Then msgbox("生成成功,請傳到某個空間"):x("url").innerHTML="<font color=red>生成成功,請傳到某個空間</font>"'> <br>
<h4>2.生成下載者</h4>
<button onclick='vbs:jsdown():If Findfile("jsdown.js") = true Then msgbox "生成成功":x("url").innerHTML="用法是cscript jsdown.js xmlurl savepath"' >生成js下載者</button><button onclick='vbs:vbsdown():If Findfile("vbsdown.vbs") = true Then msgbox "生成成功":x("url").innerHTML="<font color=blue>用法是cscript vbsdown.js xmlurl savepath</font>"'>生成vbs下載者</button><br><br><br><br>
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 晋城| 青岛市| 柳州市| 大安市| 大庆市| 山西省| 凤城市| 石屏县| 全州县| 云龙县| 金门县| 波密县| 正镶白旗| 新疆| 呼伦贝尔市| 张家港市| 凤庆县| 广西| 丹巴县| 万载县| 兴化市| 洛南县| 黄大仙区| 昆明市| 临沧市| 闸北区| 通辽市| 会宁县| 枝江市| 库车县| 松溪县| 东明县| 南昌市| 南宫市| 宁阳县| 普陀区| 东阳市| 拜城县| 黄骅市| 南开区| 滨州市|