function kobe(id)
     {
          var targetText = document.getElementById(id);
          try
          {
                 var clipText = targetText.createTextRange();
                 clipText.execCommand("Copy");
                 alert("复制成功!");
          }
          catch(e)
          {
                 alert("您的浏览器不支持剪贴板复制,请手动记下群号:271816905!");
           }
     }

 

<input type="hidden" name="qqq" value="271816905" />

<input type="button" value="复制" class="copy_btn" onclick="kobe('qqq');">

相关文章:

  • 2023-02-04
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2021-05-11
  • 2022-02-15
  • 2021-11-08
猜你喜欢
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2021-09-27
  • 2021-11-16
相关资源
相似解决方案