function copyfn(text) {
var copyInput = document.createElement("input");
copyInput.setAttribute("value", text);
document.body.appendChild(copyInput);
copyInput.select();
document.execCommand("copy");
document.body.removeChild(copyInput);
}
js复制文本内容
于 2022-02-08 11:43:57 首次发布