[ad_1]
I need to copy html div to clipboard,I am following the tutorial to copy.
function copyElement(html){
var input = document.createElement('textarea');
input.innerHTML = html;
document.body.appendChild(input);
input.select();
var result = document.execCommand('copy');
document.body.removeChild(input);
return result;
}
it works but it only copy the html element instead of html string, how would I get the html ?
[ad_2]