JS table a new row when how to add this line to become the style were also incorporated such as <tr class = "trd0">

 

JS table when a new row how to add this line style were also incorporated into e.g. <TR class = "TRD0"> . 5

The JS:
var = Tab document.getElementById ( "Tab");
var newTr tab.insertRow = (-1);  
newTr.id = "tr_" + TRID;
first column //; var newTdContent = newTr.insertCell (1 )
var newTdCaoZuo = newTr.insertCell (2); // second column        
// set two data 
newTdContent.innerHTML = "<textarea rows = ' 5' cols = '40'name =' getContent 'id =' getContent '> "+ content.value +" </ TextArea> ";

newTdCaoZuo.innerHTML =" <INPUT type = "Button" the onclick = 'moveTr ( "+ TRID +") "value =' remove '>";

now, add table in which the line's table with which new lines are represented different, because the new table style which is defined
table
<TR class = "TRD0">
<TD> .. < /td>
<tr> 
 
 
 
Solution:
newTr.setAttribute("class", "trd0");
newTr.className = "trd0";

Guess you like

Origin www.cnblogs.com/niudaxianren/p/11739310.html