现在的位置: 首页 > 综合 > 正文

js取汉字的首字母

2013年11月04日 ⁄ 综合 ⁄ 共 741字 ⁄ 字号 评论关闭

导读:
   function getpychar(char)
tmp=65536+asc(char)
if(tmp>  function getpychar(char)
  tmp=65536+asc(char)
  if(tmp>=45217 and tmp  if(tmp>=45253 and tmp  if(tmp>=47761 and tmp  if(tmp>=46318 and tmp  if(tmp>=46826 and tmp  if(tmp>=47010 and tmp  if(tmp>=47297 and tmp  if(tmp>=47614 and tmp  if(tmp>=48119 and tmp  if(tmp>=49062 and tmp  if(tmp>=49324 and tmp  if(tmp>=49896 and tmp  if(tmp>=50371 and tmp  if(tmp>=50614 and tmp  if(tmp>=50622 and tmp  if(tmp>=50906 and tmp  if(tmp>=51387 and tmp  if(tmp>=51446 and tmp  if(tmp>=52218 and tmp  if(tmp>=52698 and tmp  if(tmp>=52980 and tmp  if(tmp>=53689 and tmp  if(tmp>=54481 and tmp  end function
  
  function getpy(str)
  for i=1 to len(str)
  getpy=getpy&getpychar(mid(str,i,1))
  next
  end function
  %>
  

本文转自
http://www.afuer.com/article.asp?id=232

抱歉!评论已关闭.