欢迎光临
我们一直在努力

怎么秋实现输入拼音的按照汉字查询?或输入拼音的按照汉字查询?

建站超值云服务器,限时71元/月

<%
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
%>
这个函数可以实现按照拼音查询?如果输入"青"就可以的到"q"但是它到底是怎么工作的?

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 怎么秋实现输入拼音的按照汉字查询?或输入拼音的按照汉字查询?
分享到: 更多 (0)