订阅本栏目 RSS您所在的位置: 深山工作室 > ASP > 正文

asp获取汉字拼音的第一个字母

深山工作室 2014/5/20 14:26:54 深山 字体:大 中 小 浏览 3662
 <%
'获取汉字拼音第一字母
function getpychar(char) 
dim tmp
tmp=65536+asc(char) 
if(tmp>=45217 and tmp<=45252) then  
getpychar= "A" 
elseif(tmp>=45253 and tmp<=45760) then 
getpychar= "B" 
elseif(tmp>=45761 and tmp<=46317) then 
getpychar= "C" 
elseif(tmp>=46318 and tmp<=46825) then 
getpychar= "D" 
elseif(tmp>=46826 and tmp<=47009) then  
getpychar= "E" 
elseif(tmp>=47010 and tmp<=47296) then  
getpychar= "F" 
elseif(tmp>=47297 and tmp<=47613) then  
getpychar= "G" 
elseif(tmp>=47614 and tmp<=48118) then 
getpychar= "H" 
elseif(tmp>=48119 and tmp<=49061) then 
getpychar= "J" 
elseif(tmp>=49062 and tmp<=49323) then  
getpychar= "K" 
elseif(tmp>=49324 and tmp<=49895) then  
getpychar= "L" 
elseif(tmp>=49896 and tmp<=50370) then  
getpychar= "M" 
elseif(tmp>=50371 and tmp<=50613) then  
getpychar= "N" 
elseif(tmp>=50614 and tmp<=50621) then  
getpychar= "O" 
elseif(tmp>=50622 and tmp<=50905) then 
getpychar= "P" 
elseif(tmp>=50906 and tmp<=51386) then  
getpychar= "Q" 
elseif(tmp>=51387 and tmp<=51445) then  
getpychar= "R" 
elseif(tmp>=51446 and tmp<=52217) then  
getpychar= "S" 
elseif(tmp>=52218 and tmp<=52697) then  
getpychar= "T" 
elseif(tmp>=52698 and tmp<=52979) then  
getpychar= "W" 
elseif(tmp>=52980 and tmp<=53688) then  
getpychar= "X" 
elseif(tmp>=53689 and tmp<=54480) then  
getpychar= "Y" 
elseif(tmp>=54481 and tmp<=62289) then 
getpychar= "Z" 
else '如果不是中文,则不处理 
getpychar=char 
end if 
end function 
%>
相关阅读
深山行者个人网站程序V0.1
asp论坛制作教程(二)——asp论坛制作文件关系发析
绿色乡村留言板模板
在Android、iOS、Windows、MacOS中微信小程序的文件存放路径
如何让文本框不出现提交过的表单信息
JS+CSS实现图片放大预览效果(购物时放在产品上面预览图片)
windows xp设置IIS。
CSS Alpha透明代码相关知识学习
更多信息>>栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
DIV+CSS
HTML
python
更多>>同类信息
ASP中Utf-8与Gb2312编码转换乱码问题的解决方法页面编码声明
asp显示随机密码
通过阿里云服务接口获得ip地址详细信息
iis点开后任务栏上有显示,但是窗口看不到的解决办法
RSA加密解密插件
微软Encoder加密解密函数
更多>>最新添加文章
2026 aliyun阿里域名云注册续费优惠口令
dw里面查找替换使用正则删除sqlserver里面的CONSTRAINT
Android移动端自动化测试:使用UIAutomatorViewer与Selenium定位元素
抖音直播音挂载小雪花 懂车帝小程序
javascript获取浏览器指纹可以用来做投票
火狐Mozilla Firefox出现:无法载入您的Firefox配置文件 它可能已经丢失 或是无法访问 问题解决集合处理办法
在Android、iOS、Windows、MacOS中微信小程序的文件存放路径
python通过代码修改pip下载源让下载库飞起
更多>>随机抽取信息
26件网站推广网页优化必须的事情
[转载]中国行政区划数据(省市区街道)
专注于自由行的旅游服务商建站解决方案
仿淘宝首页商品分类列表效果
CSS编写过程中常见的10个错误
asp中最难发现的错误由最简单的程序引起