你看看能不能满足你的要求:
Function Dec2Hex_reversed(dec)
If IsNumeric(dec) Then
rst=Hex(dec) '10进制转换为16进制后的结果
raw_strlen=Len(rst) 'rst实际的位数
If (raw_strlen Mod 2)=1 Then '转换后的16进制数是奇数位,需要补零
output = output & 0
output = output & Right(rst,1) & " " '加上空格,看得更清楚
strlen=raw_strlen-1
Else
strlen=raw_strlen
End If
For i=strlen To 2 Step -2
output = output & Mid(rst,i-1,2) & " " '加上空格,看得更清楚
Next
Dec2Hex_reversed=output
Else
Dec2Hex_reversed="请输入有效数字"
End If
End Function
input=InputBox("请输入要转换的数字")
WScript.Echo(Dec2Hex_reversed(input))
没啥鸟用。。。。。。。