공부
[Browser] read clipboard
승가비
2020. 5. 2. 18:22
728x90
navigator.clipboard.readText().then(
clipText => document.getElementById("outbox").innerText = clipText);
https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText
Clipboard.readText()
The Clipboard interface's readText() method returns a Promise which resolves with a copy of the textual contents of the system clipboard.
developer.mozilla.org
728x90