浏览文章
文章信息
Js点击复制|点击按钮复制|click and copy
15234
示例:
/*点击复制*/ function clickCopy(obj) { var input = document.createElement("input"); input.value = obj.value; document.body.appendChild(input); input.select(); input.setSelectionRange(0, input.value.length), document.execCommand('Copy'); document.body.removeChild(input); confirm('<?= __("Link copied!You can share and earn your commision.") ?>', "text"); }样本:
<button class="primary action" value="https://bbs.aiweline.com?>" onclick="clickCopy(this)" >点击复制</button>