Skip to content

Instantly share code, notes, and snippets.

@elvisciotti
Last active December 11, 2015 10:18
Show Gist options
  • Save elvisciotti/4585773 to your computer and use it in GitHub Desktop.
Save elvisciotti/4585773 to your computer and use it in GitHub Desktop.
Simple HTML+JS code to display a warning when Javascript is not enabled
<!-- displays the following warning, then hide immediately with javascript.
If javascript is not enabled, the message will be displayed. No JQuery needed -->
<p id="jsenabled" style="color:red">Javascript must be enabled to use the form !</p>
<script type="text/javascript">
document.getElementById('jsenabled').innerHTML='';
document.getElementById('jsenabled').style.display = 'none';
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment