function copyfun(txt){
// 传复制的文本
var copyipt = document.createElement("input");
var text = txt;
copyipt.setAttribute("value", text);
document.body.appendChild(copyipt);
copyipt.select();
document.execCommand("copy");
document.body.removeChild(copyipt);
FoxUI.toast.show('复制成功')
}
JS点击复制文本
最新推荐文章于 2024-05-06 11:46:07 发布