$('.copy').click(function(){
var text=$(this).prev().children().text()
const input = document.createElement('input');
input.setAttribute('readonly','readonly');
input.setAttribute('value',text);
document.body.appendChild(input);
input.setSelectionRange(0, 9999);
if (document.execCommand('copy')) {
input.select()
document.execCommand('copy');
}
document.body.removeChild(input);
$('.clipBoard_notice').css('display','block')
clearTimeout(this.delay)
this.delay=setTimeout(function(){
$('.clipBoard_notice').css('display','none')
},2000)
})
移动端 点击 复制到剪贴版
猜你喜欢
转载自www.cnblogs.com/luoshida/p/12071867.html
今日推荐
周排行