复制代码 代码如下:
<%
'获取字符中中文首字字符
'返回:A-Z ;123 ; ###
Public Function GetSpellChar(str)
Dim tmp
GetSpellChar = "@"
tmp = 65536 + Asc(str)
If (tmp >= 45217 And tmp <= 45252) Or (tmp = 65601) Or (tmp = 65633) Or (tmp = 37083) Then
GetSpellChar = "A1"
ElseIf (tmp >= 45253 And tmp <= 45760) Or (tmp = 65602) Or (tmp = 65634) Or (tmp = 39658) Then
GetSpellChar = "B1"
ElseIf (tmp >= 45761 And tmp <= 46317) Or (tmp = 65603) Or (tmp = 65635) Or (tmp = 33405) Then
GetSpellChar = "C1"
ElseIf (tmp >= 46318 And tmp <= 46930) Or (tmp = 61884) Or (tmp = 63468) Or (tmp = 65604) Or (tmp >= 36820
And tmp <= 38524) Or (tmp = 65636) Then
GetSpellChar = "D1"
ElseIf (tmp >= 46931 And tmp <= 47009) Or (tmp >= 46827 And tmp <= 46842) Or (tmp = 65605) Or (tmp = 65637)
Or (tmp = 61513) Then '46827 46833 46842
GetSpellChar = "E1"
ElseIf (tmp >= 47010 And tmp <= 47296) Or (tmp = 65606) Or (tmp = 65638) Or (tmp = 61320) Or (tmp = 63568) Or
(tmp = 36281) Then
GetSpellChar = "F1"
ElseIf (tmp >= 47297 And tmp <= 47613) Or (tmp = 65607) Or (tmp = 65639) Or (tmp = 35949) Or (tmp = 36089) Or
内容版权声明:除非注明,否则皆为本站原创文章。