If your script runs, it is enabled. You can also use the <noscript> tag to show text if the user doesn't have JS turned on.
<script type="text/javascript"><!--
document.write("You have Javascript Turned on - weeeeeee!")
//-->
</script>
<noscript><b>Please</b> turn on JavaScript! I beg you!!</noscript>