HTML:
Код: Выделить всё
Copy Table
Column 1
Column 2
Column 3
Data a
Data b
Data c
Код: Выделить всё
function copytable() {
var source = document.getElementById('TableB');
var destination = document.getElementById('TableA');
var copy = source.cloneNode(true);
copy.setAttribute('id', 'tableB');
destination.parentNode.replaceChild(copy, destination);
}
Кроме того, как мне удалить скопированную таблицу?
Подробнее здесь: https://stackoverflow.com/questions/327 ... -revisited
Мобильная версия