How to dynamically add cells to a table using JS?
-
Tell me how to write the code for such a task correctly.
There is a table with inputs by type: https://jsfiddle.net/v9ckyu3w/2/
Task: when inserting an array, for example [[1,2,3], [1,2,3], [1,2,3]], starting from this input , lines should be added, in the amount = length of array and columns, in number = length of subarrays.
When pasted into B1, you should get: https://jsfiddle.net/Ltz0s8x5/
It is desirable that the values from the arrays be inside the created cells. For example, in B1 -1, in C1 - 2, in C3 - 2 ...JavaScript Elliott Simmons, May 8, 2020 -
https://jsfiddle.net/j0v5fb8y/Anonymous
1 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!