​async-clipboard-api​​​​阮一峰博客​

async function getClipboardData() {
try {
const { clipboard } = navigator;
const text = await clipboard.readText();
console.log(text);
} catch (error) {
console.error("读取剪贴板失败:", error);
}
}