×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: Jing Tai Piao
Added: Jan 23, 2013 12:14 AM
Views: 17
Tags: no tags
  1. var Browser = {
  2.   Version: function() {
  3.     var version = 999; // we assume a sane browser
  4.     if (navigator.appVersion.indexOf("MSIE") != -1)
  5.       // bah, IE again, lets downgrade version number
  6.       version = parseFloat(navigator.appVersion.split("MSIE")[1]);
  7.     return version;
  8.   }
  9. }
  10.  
  11. how to use: Browser.Version() <= 7