📌  相关文章
📜  复制到剪贴板 javascript dom - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:01.454000             🧑  作者: Mango

代码示例3
$(document).ready(function(){
    $("#ewefmwefmp").click(function(){
    //alert()
      var copyText = document.getElementById("myInput");
      copyText.select();
      copyText.setSelectionRange(0, 99999)
      document.execCommand("copy");
      alert("Copied the text: " + copyText.value);
    
    });
});