最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
一个简单但是实用的小函数,asp的
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
function sonic(tnum)
if csng(tnum)>0 then
getlar=0
if instr(tnum,"E")>1 then
tnum=tnum/10000
getlar=1
else
if instr(tnum,".")<1 then
tnum=cstr(tnum)&"."
end if
if instr(tnum,".")=1 then
tnum="0"+cstr(tnum)
end if
end if
if getlar=0 then
sonic=left(tnum&"00",instr(tnum,".")+2)
else
sonic=left(tnum&"00",instr(tnum,".")+2)+"万"
end if
elseif csng(tnum)<0 then
tnum=-csng(tnum)
if instr(tnum,".")<1 then
tnum=cstr(tnum)&"."
end if
if instr(tnum,".")=1 then
tnum="0"+cstr(tnum)
end if
sonic="-"&left(tnum&"00",instr(tnum,".")+2)
else
sonic="0.00"
end if
end function
很简单的哦
-
上一个: asp性能测试第二部分(转)(七)
-
下一个: 对提高ASP执行效率的几点看法
相关文章
- 将ASP的Debug变得简单的两个函数! 01-19
- VBS 批量Ping的项目讲解 09-19
- 如何封装一个Ajax函数介绍 09-16
- ASP实现加法验证码方法 09-16
- ASP错误捕获的几种常规处理方法介绍 09-16
- ajax实现城市三级联动的代码介绍 09-16