作家
登录

asp下返回以千分位显示数字格式化的数值

作者: 来源:www.28hudong.com 2013-03-30 08:37:48 阅读 我要评论

<% '****************************** '函数:comma(str) '参数:str,待处理的数字 '作者:阿里西西 '日期:2007/7/12 '描述:返回以千分位显示数字格式化的数值 '示例:<%=comma("120300")%> '****************************** function comma(str) if not(isnumeric(str)) or str = 0 then result = 0 elseif len(fix(str)) < 4 then result = str else pos = instr(1,str,".") if pos > 0 then dec = mid(str,pos) end if res = strreverse(fix(str)) loopcount = 1 while loopcount <= len(res) tempresult = tempresult + mid(res,loopcount,3) loopcount = loopcount + 3 if loopcount <= len(res) then tempresult = tempresult + "," end if wend result = strreverse(tempresult) + dec end if comma = result end function %>

  推荐阅读

  实现纯真IP txt转mdb数据库的方法

纯真ip数据库转动网数据库ASP脚本 去纯真网站上下载ip数据库,同时随数据库附送的查询程序(Showip.exe)具有在线检测并升级IP数据库的功能,只要运行该程序,点击右上角的 “在线升级”,就可以升级IP数据库到最新>>>详细阅读


本文标题:asp下返回以千分位显示数字格式化的数值

地址:http://www.17bianji.com/kaifa2/ASP/32486.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)