Posted By

1man on 05/14/09


css javascript element html

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Add hasJS class to HTML element

 / Published in: JavaScript

Adds a class of hasJS to the html element, can be used for CSS styling.

  1. <script type="text/javascript">document.getElementsByTagName('html')[0].className = 'hasJS';</script>

Report this snippet  

You need to login to post a comment.