[英]Is there a way to read what is copied to a user's clipboard, and paste it into the console with javascript?
我想知道是否有一種方法可以讀取復制到用戶剪貼板的內容並將其粘貼到開發工具的控制台中。
就用這個:
let text = await navigator.clipboard.readText();
console.log(text)
如果您希望它每十秒重復一次:
setInterval(function(){let text = await navigator.clipboard.readText();
console.log(text)
}, 10000)
我希望這有幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.