jQuery复制文本
jQuery复制文本
//copyId 要复制的内容 function copy(copyId) { console.log(copyId) var oInput = document.createElement('input'); oInput.value = copyId; document.body.appendChild(oInput); oInput.select(); // 选择对象 document.execCommand("Copy"); // 执行浏览器复制命令 oInput.className = 'oInput'; oInput.style.display = 'none'; layer.msg("复制成功", { time: 500 }); }

浙公网安备 33010602011771号