Determine if browser is ie, firefox and take some conditional action

Category Javascript Sub Category Browser
Bookmark and Share
Using javascript you can determine which browser is calling the site and makes changes to the markup accordingly.
Copy Code
var browser=navigator.appName; if (browser=="Microsoft Internet Explorer") { document.getElementById("trMaxLength").style.display = 'block'; } else { document.getElementById("trMaxLength").style.display = 'table-row'; }
Share the love
Bookmark and Share