1

Есть вот такой скрипт, по нажатию кнопки, создает строку таблицы, возможно ли сделать чтобы генерируемый имел ввид к примеру. Суть в том чтоя не могу подцепится другим скриптом к этой строке.

function addContact ()
{
var tb = document.getElementById ('contacts'),
    ro = tb.insertRow (-1);


NUMS = (!self.NUMS) ? 1 : ++NUMS;
var ce = ro.insertCell (0), inp = document.createElement ('div');
inp.innerHTML  =  NUMS; ce.appendChild (inp);
inp.className = ('drag');
inp.id ="Dialog" + NUM;
inp.style.background ='red';

var ce = ro.insertCell (-1), inp = document.createElement ('input');
inp.name = 'name' + NUMS; ce.appendChild (inp);

var ce = ro.insertCell (-1), inp = document.createElement ('input');
inp.name = 'text' + NUMS; ce.appendChild (inp);

var ce = ro.insertCell (-1), inp = document.createElement ('input');
inp.name = 'status' + NUMS; ce.appendChild (inp);

}

Проблема в том что свойство срабатывает и все ставится, но как добитсы trstyle1, trstyle2.... для каждой строки

ro.className = ('trstyle') ;
1
  • Ничего не понятно.
    – Qwertiy
    18 ноя 2016 в 12:35

0

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Посмотрите другие вопросы с метками или задайте свой вопрос.