💭

「クリックしたらテキストをコピー」なんか1行でいい

2022/06/30に公開
document.querySelector(".hoge").onclick = () => navigator.clipboard.writeText("コピーさせたい文字列");

Discussion