I am adding dynamic row to table through JavaScript:
var cell1 = row.insertCell(0);
var element2 = document.createElement('input');
element2.value = "valueHere";
element2.type = "text";
cell1.appendChild(element2);
It creates new row in table:
<tr>
<td>
<input type="text" value="valueHere">
</td>
</tr>
I want to add a class to <td> tag. e.g. <td class="styleClass">
To add a class to a cell/TD