<span class=”copytxt” style=” opacity: 0;”></span>
<script>
window.onload = function(){
copyUrl()
};
function copyUrl(){
document.getElementsByClassName(“copytxt”)[0].innerText = “39¥ CZ0001 NAq2doxoKw7¥。”;
const range = document.createRange();
range.selectNode(document.querySelector(“.copytxt”));
const selection = window.getSelection();
if(selection.rangeCount > 0) selection.removeAllRanges();
selection.addRange(range);
document.execCommand(“Copy”);
}
</script>
© 版权声明
文章版权归作者所有,未经允许请勿转载。