济南网页设计|自助建站济南网站建设|聊城网站建设济南网站制作|济南网站优化 http://www.mzwkj.com www.tuanqv.com

javascript全角半角转换

Function strConv(strCommix,intState)
  Dim strChar
  Dim intAsc
  Dim strTmp
 
  If intState = 0 Then
    For i = 1 To Len(strCommix)
      strChar = Mid(str1, i, 1)
      intAsc = Asc(strChar)
      If (intAsc>=-23648 And intAsc<=-23553) Then
         strTmp = strTmp & Chr(intAsc+23680)
      Else
         strTmp = strTmp & strChar
      End if   
    Next
  Else
    For i = 1 To Len(strCommix)
      strChar = Mid(str1, i, 1)
      intAsc = Asc(strChar)
      If (intAsc>=32 And intAsc<=127) Then
         strTmp = strTmp & Chr(intAsc-23680)
      Else
         strTmp = strTmp &  strChar
      End if   
    Next
  End If
  strConv = Trim(strTmp)
End Function  

posted on 2008-02-02 14:54  路大侠  阅读(196)  评论(0)    收藏  举报

导航

济南户外拓展|企业户外拓展 http://www.tuanqv.com