KillerBean Posted January 11, 2008 Report Share Posted January 11, 2008 Sveiki, jautājums par to, kā var pievienot klasi elementam.. var input = document.createElement("input"); input.id = "veselas_"+count; input.name = field; input.type = "text"; li.appendChild(input); field_area.appendChild(li); ar input.class= "lauks"; nenjem :( un inner_HTML >> field_area.innerHTML += "<li><input type='text' name='"+field+"' id='veselas_"+count+"' class='aile'/></li>"; arī neder :( Link to comment Share on other sites More sharing options...
mixis Posted January 11, 2008 Report Share Posted January 11, 2008 element.className = 'newClassName'; Link to comment Share on other sites More sharing options...
marcis Posted January 11, 2008 Report Share Posted January 11, 2008 Iesaku palasīt tutoriāli - input.setAttribute("class","lauks"); Link to comment Share on other sites More sharing options...
KillerBean Posted January 11, 2008 Author Report Share Posted January 11, 2008 paldies. tas bija tas ko vajadzēja ;) Link to comment Share on other sites More sharing options...
Recommended Posts