브라우저 버전 판단 및 업그레이드 알림

4882 단어
(function (window) {
   function getBrowserInfo () {
    var agent = navigator.userAgent.toLowerCase()
    var regStrff = /firefox\/[\d.]+/gi
    if (agent.indexOf('firefox') > 0) {
      return agent.match(regStrff)
    }
  }
  var browser = getBrowserInfo()
  var verinfo = (browser + '').replace(/[^0-9.]/ig, '')
  var theUA = window.navigator.userAgent.toLowerCase()
  if ((theUA.match(/msie\s\d+/) && theUA.match(/msie\s\d+/)[0]) || (theUA.match(/trident\s?\d+/) && theUA.match(/trident\s?\d+/)[0])) {
    var ieVersion = theUA.match(/msie\s\d+/)[0].match(/\d+/)[0] || theUA.match(/trident\s?\d+/)[0]
    if (ieVersion < 9 || verinfo < '56') {
      var str = ' low ,  :( ' var str2 = " :구글" document.writeln("
"
+ "

"

+ str + '

' + str2 + '

') document.execCommand('Stop') } } }(window))
판단 i 버전





<html lang="en" class=" en">
 jquery 
        


<script src="http://www.to8to.com/gb_js/jquery-1.10.2.min.js" type="text/javascript">script>

좋은 웹페이지 즐겨찾기