asp如何在一个输入框里输入值,然后另一个输入框直接把那个输入值转换成拼音

shanyajun 2009-10-31 04:37:10
asp如何在一个输入框里输入值,然后另一个输入框直接把那个输入值转换成拼音

比如我在一个输入框里输入“郑州”
则另一个输入框直接显示“zhengzhou”

谢谢
...全文
100 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
sases 2009-11-02
  • 打赏
  • 举报
回复
关注中~
shanyajun 2009-11-02
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 w000111 的回复:]
二楼的只能取得ZZ两个首字母,无法取得全部拼音,要取得全部拼音肯定需要一个拼音库来配合了。效果用Ajax肯定是少不了的,
[/Quote]给点代码提示啊
w000111 2009-10-31
  • 打赏
  • 举报
回复
二楼的只能取得ZZ两个首字母,无法取得全部拼音,要取得全部拼音肯定需要一个拼音库来配合了。效果用Ajax肯定是少不了的,
shanyajun 2009-10-31
  • 打赏
  • 举报
回复
用AJAX调用
怎么调用,代码怎么写,帮写下可以吗
cup_505 2009-10-31
  • 打赏
  • 举报
回复
用这个函数在ASP中转,用AJAX调用
'取得汉字串的首字母串
function getpychar(char)
dim tmpp:tmpp=65536+asc(char)
if(tmpp>=45217 and tmpp<=45252) then
getpychar= "A"
elseif(tmpp>=45253 and tmpp<=45760) then
getpychar= "B"
elseif(tmpp>=45761 and tmpp<=46317) then
getpychar= "C"
elseif(tmpp>=46318 and tmpp<=46825) then
getpychar= "D"
elseif(tmpp>=46826 and tmpp<=47009) then
getpychar= "E"
elseif(tmpp>=47010 and tmpp<=47296) then
getpychar= "F"
elseif(tmpp>=47297 and tmpp<=47613) then
getpychar= "G"
elseif(tmpp>=47614 and tmpp<=48118) then
getpychar= "H"
elseif(tmpp>=48119 and tmpp<=49061) then
getpychar= "J"
elseif(tmpp>=49062 and tmpp<=49323) then
getpychar= "K"
elseif(tmpp>=49324 and tmpp<=49895) then
getpychar= "L"
elseif(tmpp>=49896 and tmpp<=50370) then
getpychar= "M"
elseif(tmpp>=50371 and tmpp<=50613) then
getpychar= "N"
elseif(tmpp>=50614 and tmpp<=50621) then
getpychar= "O"
elseif(tmpp>=50622 and tmpp<=50905) then
getpychar= "P"
elseif(tmpp>=50906 and tmpp<=51386) then
getpychar= "Q"
elseif(tmpp>=51387 and tmpp<=51445) then
getpychar= "R"
elseif(tmpp>=51446 and tmpp<=52217) then
getpychar= "S"
elseif(tmpp>=52218 and tmpp<=52697) then
getpychar= "T"
elseif(tmpp>=52698 and tmpp<=52979) then
getpychar= "W"
elseif(tmpp>=52980 and tmpp<=53640) then
getpychar= "X"
elseif(tmpp>=53689 and tmpp<=54480) then
getpychar= "Y"
elseif(tmpp>=54481 and tmpp<=62289) then
getpychar= "Z"
else '如果不是中文,则不处理
getpychar=char
end if
end function
'//生成汉字串首字母串
function getpy(str)
for i=1 to len(str)
getpy=getpy & getpychar(mid(str,i,1))
next
end function

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧