internet explorer - IF IE conditional comment in JavaScript? -
i need display text e.g. "you using internet explorer browser" within div users using ie browsers (6-11). ms has dropped conditional comments of ie10 i'm unable via css. advice?
use navigator.useragent:
function isie () { var mynav = navigator.useragent.tolowercase(); if( mynav.indexof('msie') > -1 || mynav.indexof('.net') > -1) { // stuff; } } mynav.indexof('.net') needed detect ie 11, other versions have msie in ua string.
(modified code here)
Comments
Post a Comment