You can use:
if (navigator.appName != "Microsoft Internet Explorer")
{
alert("Please use IE");
}
OR:
if (navigator.userAgent.indexOf("MSIE") == -1)
{
alert("Please use IE");
}
FYI, you could also use the examples below but Conditional Comments are REMOVED from Internet Explorer 10.
Otherwise you could use:
<!--[if !IE]><!-->
<script type="text/javascript">
alert("Please use IE");
</script>
<!--<![endif]-->
OR this:
<!--[if IE]><script type="text/javascript">window['isIE'] = true;</script><![endif]-->
<script type="text/javascript">
if (!window.isIE) alert("Please use IE");
</script>
But still; to get this functionality in IE10; there is a workaround, which is opting into IE 9 behaviour via this meta tag:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9">