用户名: 密码: 免费注册 忘记密码? 加入收藏 | 设为首页
asp中获取汉字拼音的第一个字母
学院首页 | 资讯中心 | 服务器软件 | 系统工具 | 系统软件 | 办公软件 | 聊天软件 | 多 媒 体 | 网页制作 | 网站运营 | 平面设计
艺术欣赏 | 数据库软件 | 程序开发 | 网络组建 | 源码下载 | 驱动下载 | 软件下载 | 电脑安全 | IT创业 | IT博客 | IT社区
硬件数码导航 | 硬件频道 | 本本频道 | MP3频道 | 相机频道 | 手机频道 | 显卡频道 | LCD 频道 | 音箱音频 | 行情 | 评测 | 导购
学院专题 软件 - 系统 - 办公 - 聊天 - 多媒体 - 网页制作 - IT创业 - 运营 - 平面 - 设计欣赏 - 数据库 - 程序 - 服务器 - 组网

 当前位置: 首页>>技术频道>>程序>>ASP教程>>正文

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

日期:2006-9-15 4:29:05     来源:AspCool   编辑:   

<script language="vbs" src="spellcode.vbs"></script>
'获取客户简称的拼音缩写
function getpy()
dim str
dim i
str=document.all.txtContactName.value
dim ret
for i=1 to len(str)
ret=ret&getpychar(mid(str,i,1))
next
document.all.txtSpellCode.value=ret
end function
getpychar=char
end if
end function
spellCode.vbs
'获取汉字拼音第一字母
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
gigi_miao
  ▼ 下一篇新闻 没有了
  ▲ 上一篇新闻 ASP六大对象介绍        网友发表观点请进入=>



我要纠错】【进入论坛交流】【关闭此页

文章搜索
   
最新文章

 
·千名爱好者参与首届PHP调查
·腾讯称QQ通讯信息密钥加密 不会被
·雅虎反超Google排名搜索第二
·中搜等十余家IT企业因流氓软件被
·盛大前员工克隆网游装备获暴利被
·凤凰网将向迅雷提供娱乐及宽带内
·信产部出手规范 新浪式企业法律架
·雅虎中国称旗下软件早已没有流氓
·中搜停止划词搜索与流氓软件决裂

广告赞助
相关文章 相关教程下载
焦点信息
·腾讯称QQ通讯信息密钥加密 不会被监听
·信产部出手规范 新浪式企业法律架构不得不改
·盛大前员工克隆网游装备获暴利被追刑责
·凤凰网将向迅雷提供娱乐及宽带内容
·雅虎中国称旗下软件早已没有流氓问题
·雅虎反超Google排名搜索第二
网友评论:(评论内容只代表网友观点,与本站立场无关!)
发表评论     Hard168社区推荐帖子
姓 名: *
* 请网友遵纪守法并注意语言文明。
IT人物推荐

王江民
马云
柳传志



关于本站    联络方式    广告服务    意见信箱    加入收藏   设为首页    -
本站部分内容来自网上,如有侵权部分,敬请告知,我们会在24小时内给予处理
版权所有:Hard168.Com,如需转载文章请与我们取得联系
京ICP备05063857号 Designed by Hard168.Com
asp中获取汉字拼音的第一个字母