📅  最后修改于: 2022-03-11 15:02:49.089000             🧑  作者: Mango
var copyTextarea = document.getElementById("someTextAreaToCopy");
copyTextarea.select(); //select the text area
document.execCommand("copy"); //copy to clipboard