复制html结构到文档
document.querySelector('body').onclick = async function () {
const table = document.querySelector('.table_box table');
const textPlain = new Blob([table.innerHTML], { type: 'text/plain' });
const textHtml = new Blob([table.outerHTML], { type: 'text/html' });
await navigator.clipboard.write([
new ClipboardItem({
'text/html': textHtml,
'text/plain': textPlain,
}),
]);
};