I am copying a table cell with javascript.
It works fine, just that it doesn\'t copy the style. I wanted to copy like below, but that didn\'t work. newCell.style=old
You can copy a DOM Element with all its content (including attributes) with .cloneNode(true) :
var clonedTr = document.getElementById('id').cloneNode(true);
Then clonedTr is an exact copy of the tr #id. The "true" means you want to copy the content of the element.