代码如下:
<!
<html>
<head>
<title> Arquivo de pacote v0.1 </title>
<meta http-equiv = "content-type" content = "text/html; charset = gb2312">
<HTA: Aplicação
Id = "Arquivo de pacote v0.1"
ApplicationName = "Arquivo do pacote v0.1"
Versão = "0.1"
Scroll = "não"
INNERBORDER = "NÃO"
Contextmenu = "sim"
Legenda = "Sim"
Icon = "não"
ShowIssaskbar = "Sim"
SingleInstance = "Sim"
Sysmenu = "sim"
MaximizeButton = "não"
Windowstate = "Normal"
Navegável = "sim"
/>
<Script Language = "VBScript">
função transfert ()
Dim FileName
FileName = document.getElementById ("srcfile")
Se Len (nome do arquivo)> 0 então
Dim Oreq
'No erro de erro
'// xmlHttp 对象
set oreq = createObject ("msxml2.xmlHttp")
oreq.open "get", "arquivo: //" & filename, false
Oreq.send
ff = Oreq.ResponseBody
dim u, s, kk
u = lenb (ff)
Redim KK (U-1)
para i = 0 para u-1
s = Hex (ASCB (MIDB (ff, i+1,1)))
Se len (s) <2 então
s = "0" & s
final se
'KK = KK & S
kk (i) = s
próximo
Faça o nome do arquivo, junte -se (KK, "")
outro
document.getElementById ("srcfile"). Focus
msgbox "请选择要压缩的文件", 16, "提示"
final se
Função final
função make (nome do arquivo, dados)
Dim HTM, arquivo
Arquivo = MID (nome do arquivo, Instrrev (nome do arquivo, "/")+1)
htm = htm e dados
Dim fso, f
dim this_file
this_file = arquivo & "-pf.htm"
Set fso = createObject ("script.filesystemoBject")
Set f = fso.opentExtFile (this_file, 2, true)
F.Write htm
msgbox "生成文件" & this_file & "成功!", 64, "生成"
Função final
</Script>
</head>
<marginleft do corpo = 0 marginright = 0 onLoad = "window.resizeto 389.145">
<
<Tipo de entrada = Button Value = "转换" OnClick = "TransferT"> <Tipo de entrada = Button Value = "关闭" OnClick = "Window.close">
</body>
</html>