请问如何变这个程序?这是一个VB程序。

来源:百度知道 编辑:UC知道 时间:2024/05/15 12:58:23
用户可以输入从1到2147483647的数字,点击提交时,这个程序会将数字转换成英文单字。比如,用户输入2147483647,下面的标签应显示 Two Billion One Hundred Forty Seven Million Four Hundred Eighty Three Thousand Six Hundred Forty
急问!
急问!
谢谢大家~

俺的vb刚卸掉.还没装呢.用vbs写的,有兴趣你改一改.把下代码存为网页,扩展名:"htm".

<html><head><title>转换英文数字</title></head>
<script language="vbscript">

function change2e()
if not(isnumeric(t.value)) then
msgbox "请输入数字"
exit function
end if
n=t.value
u=""
if (3-(len(n) mod 3))=1 then n="0" & n
if (3-(len(n) mod 3))=2 then n="00" & n

for i=0 to cint(len(n)/3)
select case i
case 0
bit=" "
case 1
bit=" Thousand "
case 2
bit=" Million "
case 3
bit=" Billion "
end select
w=""
x=mid(n,len(n)-((i+1)*3-1),3)
if cint(mid(x,1,3))<>0 then
if cint(mid(x,2,2))<=20 or (cint(mid(x,2,2)) mod 10) =0 then
'msgbox cint(mid(x,2,2))
w=n2e(cint(mid(x,2,2))) & " " & bit

else<