hi guys, i have this program wherein the user can add freely how many textboxes he want. now my problem is that i have a class on my first textbox which is
then, i want to add that class name to the textbox added by the user..how could i code it??
this is my code for adding a new textbox
var table = document.getElementById(tableID); var rowCount = table.rows.length; var row = table.insertRow(rowCount); var cella = row.insertCell(0); cella.style.backgroundColor = "EAEAEA"; var element1 = document.createElement("input"); element1.type = "text"; element1.name = "txtManufacturer"; element1.size = "7"; cella.appendChild(element1);
see attached picture..
element1.className = "TextBox"
but this one does not work.
please help me..thanks in advacne..^^