Appended new row is not behaving like previous one (row)

前端 未结 3 1311
日久生厌
日久生厌 2020-11-30 15:09

I have a HTML table in side which i have several td as input field,my table is dynamic, when page loads i am appending the 1st row of my table and

3条回答
  •  抹茶落季
    2020-11-30 15:46

    I think you should assign a variable to the table:

    document. getElementById('I'd of table body');

    To create the record build it as elements:

    document.createElement('tr'), document.createElement('td'); Append to to tr. repeat as necessary...

    Then append the new record element to the table body. Each element may be added to, such as adding attributes like class or events.

    For this final record event add an on blur handler. document.addEventHandler('blur', function callback);

提交回复
热议问题