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

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

代码示例6
$('.copyable').click(function (event) {
  const targetInput  = document.getElementById('copyable');
  targetInput.select();
  document.execCommand('copy');
  //navigator.clipboard.writeText(targetInput.getAttribute('data-url'));
  alert("Link Copied");
});