input输入框
<div >点击复制群号</button>

给button添加一个事件
$("#qqQunCopyBtn1").on('click',function(){
var e=document.getElementById("awardQqQun1");//对象是content
e.select(); //选择对象
document.execCommand("Copy"); //执行浏览器复制命令
alert("群号复制成功");
});

 

该方法只能复制input里面的内容

相关文章:

  • 2022-12-23
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-10-26
猜你喜欢
  • 2022-12-23
  • 2021-12-31
  • 2021-12-31
  • 2022-02-07
  • 2021-05-22
  • 2022-02-02
相关资源
相似解决方案