🌈 搜索
📅  最后修改于: 2022-03-11 15:02:32.050000             🧑  作者: Mango
function copyToClipboard(element) { var $temp = $(""); var brRegex = //gi; $("body").append($temp); $temp.val($(element).html().replace(brRegex, "\r\n")).select(); document.execCommand("copy"); $temp.remove(); } $( "#FailCopy" ).click(function() { alert("Well done! div #error-details has been copy to your clipboard, now paste it in the notepad or email!"); });