Skip to content

trezhywinks/Copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

script cod - copy

    <button class="shared" onclick="cop();" id="link-2">copied</button>
  function cop() {
        const text = "your text";
        const sco = document.querySelector('.shared');
        navigator.clipboard.writeText(text)
          .then(() =>
            sco.innerText = "copied!")
          //alert("Copied: " + text))
          .catch(err => console.error("Error when copying", err));
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published