I have a function that checks the age of a form submission and then returns new content in a div depending on their age. Right now I am just using getElementById to replace
You can append a class to the className member, with a leading space.
className
document.getElementById('hello').className += ' new-class';
See https://developer.mozilla.org/En/DOM/Element.className