if condition: if the browser is IE and IE browser version is older than 9

前端 未结 9 1181
时光说笑
时光说笑 2020-12-24 09:17

The if condition below I think it says - if the browser is IE and IE browser version is newer than 9, but I don\'t have IE 9 to test it so it is hard to know the correct out

9条回答
  •  没有蜡笔的小新
    2020-12-24 09:53

    Your code looks fine, but you forgot to set the radix parameter in parseInt:

    if ($.browser.msie && parseInt($.browser.version, 10) > 9){
    
      // you need to wait a couple years to test if it works...
      alert("I'm IE10 or 11...");
    
    }
    

    This cannot cause any errors

提交回复
热议问题