Skip to main content
Home / Code Snippets / JavaScript / Detect Javascript On/Off, With Notification

Detect Javascript On/Off, With Notification

<script type="text/javascript">
   document.write("Welcome, you have Javascript on.")
</script>

<noscript>JavaScript is off. Please enable to view full site.</noscript>

If JavaScript is on the user gets a welcome message. If off, the user is instructed to turn it on.

icon-link icon-logo-star icon-search icon-star