Answers for "copy data to clipboard html"

3

html pass a string to clipboard

function copyToClipboard(text) {
    var dummy = document.createElement("textarea");
    // to avoid breaking orgain page when copying more words
    // cant copy when adding below this code
    // dummy.style.display = 'none'
    document.body.appendChild(dummy);
    //Be careful if you use texarea. setAttribute('value', value), which works with "input" does not work with "t
Posted by: Guest on September-08-2020

Code answers related to "copy data to clipboard html"

Browse Popular Code Answers by Language