Function ChangeTypeCN(par_content)
dim cton,ntoc,Cno,Cycle,Nycle,Carray
Cno="一~二~三~四~五~六~七~八~九~十~十一~十二~十三~十四~十五~十六~十七~十八~十九~二十"
Carray=split(Cno,"~")
if isNumeric(par_content) then
for Cycle=0 to 19
if par_content=Cycle then
ntoc=Carray(Cycle-1)
ChangeTypeCN=ntoc
end if
next
else
for Cycle=0 to 19
if par_content=Carray(Cycle) then
cton=Cycle
ChangeTypeCN=cton+1
end if
next
end if
end Function
dim cton,ntoc,Cno,Cycle,Nycle,Carray
Cno="一~二~三~四~五~六~七~八~九~十~十一~十二~十三~十四~十五~十六~十七~十八~十九~二十"
Carray=split(Cno,"~")
if isNumeric(par_content) then
for Cycle=0 to 19
if par_content=Cycle then
ntoc=Carray(Cycle-1)
ChangeTypeCN=ntoc
end if
next
else
for Cycle=0 to 19
if par_content=Carray(Cycle) then
cton=Cycle
ChangeTypeCN=cton+1
end if
next
end if
end Function
使用方法:假如sek_hidweek=1
response.write(ChangetypeCN(sek_hidweek))那么输出就为一
假如sek_hidweek='五',那么输出就为5,现在只做了1到20的相互转换,如果要扩展,只需要改一点参数就行了
博客介绍了一种数字转换功能,当sek_hidweek为'五'时输出为5,目前实现了1到20的相互转换,若要扩展,仅需修改一点参数。

被折叠的 条评论
为什么被折叠?



