<script> hasIE = /*@cc_on true; @*/false; hasFireFox = !!window.sidebar; if (hasIE > 0) { alert('IE'); } else { if (hasFireFox > 0) { alert('FF'); } else { alert('other'); } } </script>