代码如下:
<! Doctype html público "-// w3c // dtd html 4.01 transitional // en">
<html>
<Evista>
<title> Archivo de paquete v0.1 </title>
<meta http-oquiv = "content-type" content = "text/html; charset = gb2312">
<HTA: aplicación
Id = "archivo de paquete v0.1"
ApplicationName = "Archivo de paquete v0.1"
Versión = "0.1"
Scroll = "No"
InnerBorder = "no"
ContextMenu = "Sí"
Subtítulos = "Sí"
Icon = "no"
ShowInTaskBar = "Sí"
SingleInstance = "Sí"
Sysmenu = "sí"
MaximizeButton = "no"
WindowState = "Normal"
Navegable = "Sí"
/>
<Script language = "VBScript">
función transfert ()
Nombre de archivo Dim
filename = document.getElementById ("srcfile"). valor
Si len (nombre de archivo)> 0 entonces
Dim Oreq
'En el currículum de error a continuación
'// 创建 xmlhttp 对象
establecer oreq = createObject ("msxml2.xmlhttp")
Oreq.open "Get", "archivo: //" y nombre de archivo, falso
Oreq.send
ff = Oreq.ResponseBody
Dim U, S, KK
U = LENB (FF)
Redim KK (U-1)
para i = 0 a U-1
S = Hex (ASCB (MidB (FF, i+1,1)))
Si len (s) <2 entonces
S = "0" y S
final si
'kk = kk & s
kk (i) = s
próximo
hacer nombre de archivo, unirse (kk, "")
demás
document.getElementById ("srcfile"). Focus
msgbox "请选择要压缩的文件", 16, "提示"
final si
función final
Function Make (nombre de archivo, datos)
Dim HTM, archivo
file = Mid (FileName, Instrrever (FileName, "/")+1)
htm = htm y datos
Dim FSO, F
Dim this_file
this_file = file & "-pf.htm"
Establecer fso = createObject ("scripting.filesystemObject")
Establecer f = fso.opentextfile (this_file, 2, verdadero)
F.WRITE HTM
msgbox "生成文件" & this_file & "成功!", 64, "生成"
función final
</script>
</ablo>
<Body marginleft = 0 marginright = 0 onload = "window.resizeto 389,145">
请选择文件 : <input type = file id = "srcfile"> [br] [br]
<Entrada type = button value = "转换" onClick = "transfert"> <input type = button value = "关闭" onClick = "window.close">
</body>
</html>