Check whether the browser is Internet Explorer or not using javascript

Click to rate this tutorial!
[Total: 2 Average: 5]

This is a very simple method and the shortest way to find out whether the browser in which the webpage is loaded is IE or not

<script type="text/javascript">
var IE='\v'=='v';
if(IE) {
//ie code here
alert("This webpage has been loaded on an IE [Internet Explorer]")
}else
{
alert("This is not IE ha ha, You cannot make me a fool....")
}
</script>

LIVE DEMO

Click to rate this tutorial!
[Total: 2 Average: 5]

Leave a Reply

Your email address will not be published.