exe轉(zhuǎn)換16進(jìn)制的html保存的hta實(shí)現(xiàn)代碼
來(lái)源:易賢網(wǎng) 閱讀:1684 次 日期:2014-08-12 17:07:19
溫馨提示:易賢網(wǎng)小編為您整理了“exe轉(zhuǎn)換16進(jìn)制的html保存的hta實(shí)現(xiàn)代碼”,方便廣大網(wǎng)友查閱!

代碼如下:

<!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>

更多信息請(qǐng)查看IT技術(shù)專欄

更多信息請(qǐng)查看腳本欄目
由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

2025國(guó)考·省考課程試聽(tīng)報(bào)名

  • 報(bào)班類型
  • 姓名
  • 手機(jī)號(hào)
  • 驗(yàn)證碼
關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡(jiǎn)要咨詢 | 簡(jiǎn)要咨詢須知 | 加入群交流 | 手機(jī)站點(diǎn) | 投訴建議
工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
云南網(wǎng)警備案專用圖標(biāo)
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號(hào):hfpxwx
咨詢QQ:526150442(9:00—18:00)版權(quán)所有:易賢網(wǎng)
云南網(wǎng)警報(bào)警專用圖標(biāo)