📅  最后修改于: 2022-03-11 15:03:07.547000             🧑  作者: Mango
function copyToClipboard(text) {
var input = document.body.appendChild(document.createElement("input"));
input.value = text;
input.focus();
input.select();
document.execCommand('copy');
input.parentNode.removeChild(input);
}