SyntaxFix
Write A Post
Hire A Developer
Questions
I'd recommend that you take a look at jQuery.
jQuery way:
$("html").addClass("myClass");