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

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

代码示例5
#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);
});