我通过Request.ServerVariables("ALL_HTTP")取得HTTP头,然后判断其http_user_agent的值,IE与netscape是有区别的,但是IE与MYIE2,TT就没有区别,(可能是因为MYIE和TT使用的是IE的内核的原因)其值是相同的,我应该如何判断用户的浏览是MYIE2,TT还是IE呢。

解决方案 »

  1.   

    Javascriptvar tt_db = (document.compatMode && document.compatMode != 'BackCompat')? document.documentElement : document.body? document.body : null,
    tt_n = navigator.userAgent.toLowerCase();// Browser flags
    var tt_op = !!(window.opera && document.getElementById),
    tt_op6 = tt_op && !document.defaultView,
    tt_ie = tt_n.indexOf('msie') != -1 && document.all && tt_db && !tt_op,
    tt_n4 = (document.layers && typeof document.classes != "undefined"),
    tt_n6 = (!tt_op && document.defaultView && typeof document.defaultView.getComputedStyle != "undefined"),
    tt_w3c = !tt_ie && !tt_n6 && !tt_op && document.getElementById;
      

  2.   

    用javascript吧var an = navigator.appName;
    if ((an.indexOf("Microsoft") < 0 )
    document.write("您的浏览器无法正常运行此程序!");
      

  3.   

    javascript的navigator.appName也只能判断是MSIE还是NNS,不能区分myie2,ie,tt这些同是IE内核的浏览器
      

  4.   

    看看那个叫做雷敖的论坛,那个论坛可以认出MyIE,TT,Maxthon这些都可以。
    我也关注一下吧,那个论坛是PHP的,看不懂的说。
      

  5.   

    用JS在window_load事件中判断一下,代码楼上的几位兄弟已给出了!
      

  6.   

    Javascriptvar tt_db = (document.compatMode && document.compatMode != 'BackCompat')? document.documentElement : document.body? document.body : null,
    tt_n = navigator.userAgent.toLowerCase();// Browser flags
    var tt_op = !!(window.opera && document.getElementById),
    tt_op6 = tt_op && !document.defaultView,
    tt_ie = tt_n.indexOf('msie') != -1 && document.all && tt_db && !tt_op,
    tt_n4 = (document.layers && typeof document.classes != "undefined"),
    tt_n6 = (!tt_op && document.defaultView && typeof document.defaultView.getComputedStyle != "undefined"),
    tt_w3c = !tt_ie && !tt_n6 && !tt_op && document.getElementById;
      

  7.   

    象 v192(魔渡众生) 说的那样
       我是想识别MyIE,TT,Maxthon,不知如何操作呢