判断是否低于IE6的版本。转来滴。觉得很好。O(∩_∩)O哈哈哈~

<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  
  <script>
   $(function() {
       if (($.browser.msie && $.browser.version <= "6.0") || !$.browser.msie) {
          alert("invalid browser! it will be shutdown after 5s!");
          var count = 5;
          var decreasement = function() {
               if (count > 0) {
                  $("#msg").html("<h1>" + count + "</h1>");
                  count --;
                  setTimeout(decreasement, 1000);
               }
               else {
                  window.close();
               }
          };
          decreasement();
       }
   });

</script>
</head>
<body>
<div id="msg"></div>
</body>
</html>
posted @ 2012-01-18 14:33  kangwl  阅读(166)  评论(1编辑  收藏  举报