I have written a short and simple example on how you can add a row using JavaScript. The row added will have an Id, onMouseOver and onMouseOut functions, and a class name assigned into it. Click here for the article.
This other example shows you how to modify a the cell or <TD> inside each <TR> tag. It is useful when you want to modify the entire row when you have already assigned a classname to the entire <TR> tag.