Javascript clone DOM attribute
xxxxxxxxxx
let d1 = document.getElementById("one");
let d2 = document.getElementById("two");
let a = d1.getAttributeNode("align");
d2.setAttributeNode(a.cloneNode(true));
// Returns: 'left'
alert(d2.attributes[1].value);