zoukankan      html  css  js  c++  java
  • 获取客户端使用的浏览器

    获取是什么浏览器 

    <script>

    getOs();
     function getOs()   
     {   
         var OsObject = "";   
        if(navigator.userAgent.indexOf("MSIE")>0) {  //ie
           document.getElementById('selectpic').src="http://www.bioon.com.cn/images/2010/ie.gif";
           document.getElementById('selectpic').title="添加到浏览器收藏夹";
        } else{   //非ie
          document.getElementById('selectpic').src="http://www.bioon.com.cn/images/2010/fie.jpg";
          document.getElementById('selectpic').title="添加到浏览器书签";
        }   
    }   

    </script>

    asp

    <%

     nstr=request.serverVariables("HTTP_USER_AGENT")     

      if   instr(1,nstr,"MSIE   6.0",1)>0   then     
      response.write("您使用的是IE6.0浏览器")     
      elseif   instr(1,nstr,"MSIE   5.0",1)>0   then     
      response.write("您使用的是IE5.0浏览器")     
      elseif   instr(1,nstr,"firefox",1)>0   then     
      response.write("您使用的是   FIREFOX   浏览器")     
      else     
      response.write("未知浏览器类型")     
      end   if

    %> 

  • 相关阅读:
    任意进制间的转换
    判断线段相交 hdu 1086
    大数(高精度)加减乘除取模运算
    sqlserver2008透明书库加密
    数据库质疑
    sql2005 和sql2008 同时安装
    editrules
    sqlserver 表值函数
    sqlserver释放内存
    sql2008查看备份进度
  • 原文地址:https://www.cnblogs.com/ly312/p/1962065.html
Copyright © 2011-2022 走看看