Jquery determines the browser type
$(function() { if($.browser.msie) { alert("this is msie"); } else if($.browser.safari) { alert("this is safari! "); } else if($.browser.mozilla) { alert("this is mozilla! "); } else if($.browser.opera) { alert("this is opera"); } else { alert("i don't konw! "); }
<!--[if IE 6]> <p>You are using IE6 to access this page. In order to achieve better display effect, please upgrade your browser version</ p> <![endif]-->
<! -- [if IE]><p>You are using IE browser</p><! [endif]--> <! [if! IE]><p>You are not using an IE browser</ p><! [endif]> <! -- [if (IE 5)]><p>You are using IE5 browser</ p><! [endif]--> <! -- [if (gte IE 5.5)&(lt IE 7)]><p>You are using IE5.5 or IE6 browser</ p><! [endif]--> <! -- [if lt IE 5.5]><p>You are using browsers below IE5</p><! [endif]--> <! -- [if IE 7]><p>You are using IE7 browser</ p><! [endif]--> <! -- [if! (IE 7)]><p>You are not using an IE7 browser</ p><! [endif]--> <! -- [if gte IE 7]><p>You are using IE7 or above browser</ p><! [endif]-->