📌  相关文章
📜  javascript 获取剪贴板内容 - Javascript 代码示例

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

代码示例6
#note that this will prompt the user to allow acces to clipboard
navigator.clipboard.readText().then(text => {
    console.log('Clipboard content is: ', text);
  })
  .catch(err => {
    console.error('Failed to read clipboard contents: ', err);
});