Posted By

lwcooper on 02/18/10


Tagged

javascript


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

flicity


Add classname to the body using Javascript


 / Published in: JavaScript
 

Add a classname of js to the document body to style browsers with javascript enabled differently

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

Report this snippet  

You need to login to post a comment.