如何判断客户端用的Fire Fox浏览器并转向某页面
如何判断客户端用的Fire Fox浏览器并转向某页面或者只能用IE浏览器,    没有用其它插件,如果用了插件转向某页面

解决方案 »

  1.   

    可以用navigator.appName来判决,最好是判断内核,例如
    if( !document.all && document.getElementById && !window.opera ){alert('您用的是Fire Fox浏览器')}
      

  2.   

     Browser: {
        IE:     !!(window.attachEvent && !window.opera),
        Opera:  !!window.opera,
        WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
        Gecko:  navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1
      }
    if(Browser.IE){}//ie code
    else if(Browser.Opera){}//firefox code
      

  3.   

    if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
    alert("火狐")
    }
      

  4.   

    var ns=navigator.appName=="Netscape"?true:false;if(ns) alert("Fire Fox!");