asp如何实现按照输入汉字提示拼音功能?
发布时间:2010-05-18 18:37:00
输入汉字提示拼音,试试下面这个函数,不知是不是你要的那个:
查询汉字便宜到词典网
<%
function getpychar(char)
tmp=65536+asc(char)
if(tmp>=45217 and tmp<=45252) then getpychar= "A"
if(tmp>=45253 and tmp<=45760) then getpychar= "B"
if(tmp>=47761 and tmp<=46317) then getpychar= "C"
if(tmp>=46318 and tmp<=46825) then getpychar= "D"
if(tmp>=46826 and tmp<=47009) then getpychar= "E"
if(tmp>=47010 and tmp<=47296) then getpychar= "F"
if(tmp>=47297 and tmp<=47613) then getpychar= "G"
if(tmp>=47614 and tmp<=48118) then getpychar= "H"
if(tmp>=48119 and tmp<=49061) then getpychar= "J"
if(tmp>=49062 and tmp<=49323) then getpychar= "K"
if(tmp>=49324 and tmp<=49895) then getpychar= "L"
if(tmp>=49896 and tmp<=50370) then getpychar= "M"
if(tmp>=50371 and tmp<=50613) then getpychar= "N"
if(tmp>=50614 and tmp<=50621) then getpychar= "O"
if(tmp>=50622 and tmp<=50905) then getpychar= "P"
if(tmp>=50906 and tmp<=51386) then getpychar= "Q"
if(tmp>=51387 and tmp<=51445) then getpychar= "R"
if(tmp>=51446 and tmp<=52217) then getpychar= "S"
if(tmp>=52218 and tmp<=52697) then getpychar= "T"
if(tmp>=52698 and tmp<=52979) then getpychar= "W"
if(tmp>=52980 and tmp<=53640) then getpychar= "X"
if(tmp>=53689 and tmp<=54480) then getpychar= "Y"
if(tmp>=54481 and tmp<=52289) then getpychar= "Z"
end function
function getpy(str)
for i=1 to len(str)
getpy=getpy&getpychar(mid(str,i,1))
next
end function
%>


猜你喜欢
- 本文环境是python3,采用的是urllib,BeautifulSoup搭建。说下思路,这个项目分为管理器,url管理器,下载器,解析器,
- PHP生成桌面快捷方式就是这么的简单,大家生成的时候改下你要生成的网站即可。dianji.html代码:<a href="a
- 大小写字母转换:函数 uc (uppercase) 将所有的小写字母转成大写;函数 lc (lowercase) 将所有的大写字母转成小写;
- 想要一个这玩意,可是找了网上许多着色器,要么是兼容性成问题,要么是匹配不精确,比如说:1、注释里包含字符串、关键词,类似于:/* xxxx&
- 1、引言小 * 丝:鱼哥,你说咱们发快递时填写的地址信息,到后台怎么能看清楚写的对不对呢?小鱼:这种事情还要问? 你没在电商行业混过??小 * 丝:
- 一 按时间创建文件源码# 截图方式二# coding=utf-8import osimport time# 当前年月日时分秒时间 2020-
- 1.语法及用法(1)语法:str.endswith(suffix[,start][,end])str:字符串,待判断字符串suffix:后缀
- 在数据库查询的时候,我们有时有这样的需求,就是要找出数据表里指定范围行内的数据记录,比如说要找出数据表里第10行到第20行的这10条数据,那
- 本来想把这个页面用jade渲染出来、评论部分用vue,但是想了想觉得麻烦,最后还是整个用vue的组件搞定他吧。 先上在线demo:http:
- 在html 5增加了新元素header、footer,测试过发现IE不能解析html 5新增的元素。代码如下:<!DOCTYPE&nb
- Django项目默认使用sqlite 数据库,但是我想用mysql数据库,应该如何配置呢。Django连接mysql数据库的操作,是通过根模
- 一。存储过程的创建和使用 1.创建程序包,并在程序中创建存储过程 create or replace PACKAGE NCS_ICP_TJ
- 关于NaN值-在能够使用大型数据集训练学习算法之前,我们通常需要先清理数据, 也就是说,我们需要通过某个方法检测并更正数据中的错误。 - 任
- cmd中输入net start mysql 提示:服务名无效请进入MySQL的bin目录,并在bin目录打开命令行窗口,或设置系统环境变量,
- 今天启动SQLServer2000时报1053错误 错误如下所示: 发生错误 1053-(服务没有及时响应或控制请求。),此时正在 MSSQ
- 学了python后,之前一些我们常用的方法,也可以换一种思路用python中的知识来解决。相信操作出来后,能收获一大批小粉丝们。就像我们没学
- 需求在4*4的图片中,比较外围黑色像素点和内圈黑色像素点个数的大小将图片分类如上图图片外围黑色像素点5个大于内圈黑色像素点1个分为0类反之1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&
- python通过安装使用paramiko模块,将本地文件上传到服务器上import paramikoimport datetimeimpor
- 问题说明最近在写爬虫,由于单个账号访问频率太高会被封,所以需要在爬虫执行一段时间间隔后自己循环切换账号所以就在想,有没有像单片机那样子设置一