汇盛国际平台:判断浏览器的js代码

标签:关于我们    日期:2018-01-23 09:43    录入:汇盛国际平台    浏览:

  


    var browser=navigator.appName  var b_version=navigator.appVersion  var version=parseFloat(b_version)  document.write("Browser name: "+ browser)  document.write("  ")  document.write("Browser version: "+ version)  
    document.write("  

Browser: ")  document.write(navigator.appName + "  

")  document.write("  

Browserversion: ")  document.write(navigator.appVersion + "  

")  document.write("  

Code: ")  document.write(navigator.appCodeName + "  

")  document.write("  

Platform: ")  document.write(navigator.platform + "  

")  document.write("  

Cookies enabled: ")  document.write(navigator.cookieEnabled + "  

")  document.write("  

Browser's user agent header: ")  document.write(navigator.userAgent + "  

")  
    var x=navigator  document.write("CodeName=" + x.appCodeName)  document.write("  ")  document.write("MinorVersion=" + x.appMinorVersion)  document.write("  ")  document.write("Name=" + x.appName)  document.write("  ")  document.write("Version=" + x.appVersion)  document.write("  ")  document.write("CookieEnabled=" + x.cookieEnabled)  document.write("  ")  document.write("CPUClass=" + x.cpuClass)  document.write("  ")  document.write("OnLine=" + x.onLine)  document.write("  ")  document.write("Platform=" + x.platform)  document.write("  ")  document.write("UA=" + x.userAgent)  document.write("  ")  document.write("BrowserLanguage=" + x.browserLanguage)  document.write("  ")  document.write("SystemLanguage=" + x.systemLanguage)  document.write("  ")  document.write("UserLanguage=" + x.userLanguage)  
    var browser=navigator.appName  var b_version=navigator.appVersion  var version=parseFloat(b_version)  if ((browser=="Netscape"||browser=="Microsoft Internet Explorer") && (version>=4))  {  document.write("Your browser is good enough!")  }  else  {  document.write("It's time to upgrade your browser!")  }  

★★★小编:汇盛国际注册 整理文章,欢迎大家转载 ★★★