Detecting IE using jQuery

后端 未结 3 395
深忆病人
深忆病人 2020-12-03 07:31
$(window).load(function () {
   if($.browser.msie && $.browser.version==\"6.0\") {
     // do stuff
   }
});

Just realized that $.browser h

3条回答
  •  情书的邮戳
    2020-12-03 08:11

    Show the browser Information

    jQuery.each( jQuery.browser, function( i, val ) {
    $( "
    " + i + " : " + val + "" ) .appendTo( document.body ); });

    Alert the version of IE's rendering engine that is being used. Will not work in jQuery 1.9 or later unless the jQuery Migrate plugin is included.

    if ( $.browser.msie ) {
    alert( $.browser.version );
    }
    

提交回复
热议问题