function copyTable(tableElement) {
const range = document.createRange();
const selection = window.getSelection();
selection.removeAllRanges();
range.selectNode(tableElement);
selection.addRange(range);
try {
document.execCommand('copy');
alert('表格已复制到剪切板!');
} catch (err) {
alert('复制失败:' + err);
}
selection.removeAllRanges();
}
copyTable(document.getElementById('_rl_table'));