日期:2013-09-11  浏览次数:21187 次

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

使用方法:假如sek_hidweek=1
response.write(ChangetypeCN(sek_hidweek))那么输出就为一

假如sek_hidweek='五',那么输出就为5,现在只做了1到20的相互转换,如果要扩展,只需要改一点参数就行了