你不是已经得到了版本吗?
虽然这些版本信息不是数字,但只要稍写点程序不就可以了?
比如获取 MSIE 在 minor version 字符串中的位置,然后再获取紧跟其后的分号的位置,中间不就是版本吗?

解决方案 »

  1.   

    navigator.appMinorVersion....不能得到你的结果的。:-)
    试试这个,你就明白了,包括你的4.0<html><head>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>新建网页 1</title>
    </head><body><script>
    alert(window.navigator.appCodeName);
    alert(window.navigator.appMinorVersion);
    alert(window.navigator.appName);
    alert(window.navigator.browserLanguage);
    alert(window.navigator.cookieEnabled);
    alert(window.navigator.cpuClass);
    alert(window.navigator.onLine);
    alert(window.navigator.platform);
    alert(window.navigator.systemLanguage);
    alert(window.navigator.userAgent);
    alert(window.navigator.userLanguage);
    </script></body></html>
      

  2.   

    呵呵,看了楼上的例子,没有明白什么东西啊,明白了window.navigator.appMinorVersion的返回值是0,不明白为什么,反正我也用不到它。再说一遍,没有星星的不许蒙emu。
      

  3.   

    Mozilla/4.0啊,可能是基于mozilla4.0内核开发,ie的第一个版本不知道是不是4.0,我不知道,别人可以补充。
    “0”应该是一代产品中的后续版本,比如有ie5.0,ie5.5,.5应该算是ie第“五”代里的生机产品吧:-)
      

  4.   

    我写的函数,是IE的话,返回IE版本。
    不是IE就返回 false所以对于非IE浏览器GetIEVersion()<5.0 肯定成立。
    function GetIEVersion()
    {
    try
    {
    if(!window.clientInformation)return false;
    if(window.clientInformation.appName.toLowerCase()!="microsoft internet explorer")return false;
    if(window.clientInformation.appVersion.toLowerCase().indexOf("msie")==-1)return false;
    var a=window.clientInformation.appVersion.toLowerCase().split(";");
    for(var i=0;i<a.length;i++)
    {
    a[i]=a[i].replace(" ","");
    if(a[i].indexOf("msie")==0)
    {
    var version=a[i].substr(4,a[i].indexOf(".")-2);
    return version;
    }
    }
    }
    catch(exception)
    {
    }
    return false;
    }