復(fù)制代碼 代碼如下:
!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
html>
head>
title>package file v0.1/title>
meta http-equiv="Content-Type" content="text/html; charset=GB2312">
HTA:APPLICATION
ID="package file v0.1"
APPLICATIONNAME="package file v0.1"
VERSION="0.1"
SCROLL="no"
INNERBORDER="no"
CONTEXTMENU="yes"
CAPTION="yes"
ICON="no"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
MAXIMIZEBUTTON ="no"
WINDOWSTATE="normal"
NAVIGABLE="yes"
/>
SCRIPT LANGUAGE="VBScript">
function transfert()
dim filename
filename = document.getElementById("srcFile").value
if len(filename)>0 then
dim oReq
'on error resume next
'//創(chuàng)建XMLHTTP對(duì)象
set oReq = CreateObject("MSXML2.XMLHTTP")
oReq.open "get","file:\\" filename,false
oReq.send
ff = oReq.responseBody
dim u,s,kk
u = lenb(ff)
redim kk(u-1)
for i=0 to u-1
s = hex(ascb(midb(ff,i+1,1)))
if len(s)2 then
s = "0" s
end if
'kk = kk s
kk(i) = s
next
make filename,join(kk,"")
else
document.getElementById("srcFile").focus
msgbox "請(qǐng)選擇要壓縮的文件",16,"提示"
end if
end function
function make(filename,data)
dim htm,file
file = mid(filename,instrrev(filename,"\")+1)
htm = htm data
dim fso,f
dim this_file
this_file = file "-pf.htm"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(this_file, 2, True)
f.Write htm
msgbox "生成文件" this_file "成功!",64,"生成"
end function
/SCRIPT>
/head>
body marginleft=0 marginright=0 onload="window.resizeTo 389,145 ">
請(qǐng)選擇文件:input type=file id="srcFile" style="width:260px;">[br][br]
input type=button value=" 轉(zhuǎn)換 " onclick="transfert"> input type=button value=" 關(guān)閉 " onclick="window.close">
/body>
/html>
您可能感興趣的文章:- C# VB 實(shí)現(xiàn)10進(jìn)制 16進(jìn)制之間互相轉(zhuǎn)換
- JavaScript中的16進(jìn)制字符(改進(jìn))
- JavaScript中的16進(jìn)制字符介紹
- php中將圖片gif,jpg或mysql longblob或blob字段值轉(zhuǎn)換成16進(jìn)制字符串
- vbs sendKeys 16進(jìn)制的結(jié)合使用(打開(kāi)IE,靜音,打開(kāi)播放器等)
- VBS 16進(jìn)制驗(yàn)證特定字符
- asp.net(c#)下各種進(jìn)制間的輕松轉(zhuǎn)換(2進(jìn)制、8進(jìn)制、10進(jìn)制、16進(jìn)制)
- vbscript語(yǔ)句中“H”專用于16進(jìn)制數(shù)表示
- C# 16進(jìn)制與字符串、字節(jié)數(shù)組之間的轉(zhuǎn)換
- 文本和16進(jìn)制UltraEdit-32 v13.20+3 官方簡(jiǎn)體中文版+破解補(bǔ)丁 提供下載
- 16進(jìn)制的轉(zhuǎn)換之javascript運(yùn)行時(shí)會(huì)自動(dòng)轉(zhuǎn)碼
- c#實(shí)現(xiàn)16進(jìn)制和字符串之間轉(zhuǎn)換的代碼
- 16進(jìn)制顯示字節(jié)流技巧分享