联系我们

function copy(message){var input = document.createElement("input");       
input.value = message;         
document.body.appendChild(input);     
input.setAttribute("readonly","readonly");input.select();         input.setSelectionRange(0, input.value.length), document.execCommand('Copy');    layer.open({ content: '复制成功',skin: 'msg',time: 2});}
<div onclick="copy("我要复制的内容")></div>