02
2019
08

判断手机、微信浏览器

Function is_Mobile()

      Dim ua : ua = Request.ServerVariables("HTTP_USER_AGENT")

      If Instr(ua,"Mobile") Then

        is_Mobile = True

      Else

        is_Mobile = False

      End If

End Function

Function is_weixin()

     Dim ua : ua = request.ServerVariables("HTTP_USER_AGENT")

      If Instr(Lcase(ua),"micromessenger")>0 Then

         is_weixin = True

      Else

         is_weixin = False

      End If

End function

 

« 上一篇下一篇 »