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

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

深山工作室 2014/5/20 14:26:54 深山 字体: 浏览 4537
 <%
'获取汉字拼音第一字母
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 
%>
相关阅读
纯div+css制作的弹出菜单-05
张家港国贸旅行社有限公司
360500怎么样?啥时候能帮我的工资给我。
微信公众号用客服接口推送菜单消息
如何提高网站的PR值
利用ASP正则提取文章里面的图片的有效的src地址
微信公众平台
浅论网页优化和网站优化的方式
共有0条关于《asp获取汉字拼音的第一个字母》的评论
发表评论
正在加载评论......
返回顶部发表评论
呢 称:
表 情:
内 容:
评论内容:不能超过 1000 字,需审核,请自觉遵守互联网相关政策法规。
验证码: 验证码 
网友评论声明,请自觉遵守互联网相关政策法规。

您发布的评论即表示同意遵守以下条款:
一、不得利用本站危害国家安全、泄露国家秘密,不得侵犯国家、社会、集体和公民的合法权益;
二、不得发布国家法律、法规明令禁止的内容;互相尊重,对自己在本站的言论和行为负责;
三、本站对您所发布内容拥有处置权。

更多信息>>栏目类别选择
百度小程序开发
微信小程序开发
微信公众号开发
uni-app
asp函数库
ASP
DIV+CSS
HTML
python
更多>>同类信息
ASP中Utf-8与Gb2312编码转换乱码问题的解决方法页面编码声明
asp显示随机密码
通过阿里云服务接口获得ip地址详细信息
iis点开后任务栏上有显示,但是窗口看不到的解决办法
RSA加密解密插件
微软Encoder加密解密函数
更多>>最新添加文章
在Android、iOS、Windows、MacOS中微信小程序的文件存放路径
python通过代码修改pip下载源让下载库飞起
python里面requests.post返回的res.text还有其它的吗
aliyun阿里云续费域名优惠口令(注册、续费都可以使用)
windows7环境下安装配置jdk
python对微信操作要用到这两个库wxpy与itchat
ASP中Utf-8与Gb2312编码转换乱码问题的解决方法页面编码声明
DW设置之后更好用 DreamweaverCS编辑GB2312与UTF-8文件在代码视图中点击鼠标错位问题的解决办法
更多>>随机抽取信息
山西出国服务网
2012-7-20升级部分
CSS设计符合Web标准的网页表单的几个技巧
非常酷的javascript实现万年历功能
深山留言板教师节效果
css里media属性详解