function copyTextToClipboard(text) { var copyFrom = $('<textarea/>'); copyFrom.text(text); $('body').append(copyFrom); copyFrom.select(); document.execCommand('copy'); copyFrom.remove(); }
function copyTextToClipboard(text) { var copyFrom = $('<textarea/>'); copyFrom.text(text); $('body').append(copyFrom); copyFrom.select(); document.execCommand('copy'); copyFrom.remove(); }
转载于:https://www.cnblogs.com/Zoes/p/5908990.html