function copyToClipboard(elementId) {
    var aux = document.createElement("input");
    aux.setAttribute("value", document.getElementById(elementId).innerHTML);
    document.body.appendChild(aux);
    aux.select();
    document.execCommand("copy");

    document.body.removeChild(aux);
}
// Takes text in the element with the given ID and copies it to clipboard.
Takes text in the element with the given ID and copies it to clipboard.
Takes text in the element with the given ID and copies it to clipboard .
function copyToClipboard(elementId) {
    var aux = document.createElement("input");
    aux.setAttribute("value", document.getElementById(elementId).innerHTML);
    document.body.appendChild(aux);
    aux.select();
    document.execCommand("copy");
    document.body.removeChild(aux);
}
function copyToClipboard ( elementId ) { var aux = document . createElement ( "input" ) ; aux . setAttribute ( "value" , document . getElementById ( elementId ) . innerHTML ) ; document . body . appendChild ( aux ) ; aux . select ( ) ; document . execCommand ( "copy" ) ; document . body . removeChild ( aux ) ; }
Takes text in the element with the given ID and copies it to clipboard.
Takes text in the element with the given ID and copies it to clipboard .