SyntaxFix
Write A Post
Hire A Developer
Questions
Try using setAttribute on the result:
result.setAttribute("class","red");