Or just use the <noscript> option, thus:
Code:
<div id="warning"><script type="text/javascript">
<!--
// -->
</script>
<noscript>
<p>Your browser doesn't support JavaScript or JavaScript support has been disabled. You must enable JavaScript to use this application.</p></noscript>
</div>