<a href="javascript:void(0);" onclick="CopyTxt()">复制</a>
//复制到剪切板
function CopyTxt(){
let content=$id("Canvas").innerText;
let txa = document.createElement('textarea')
let txval = content
// console.log('copy val:', txval)
txa.value = txval
document.body.appendChild(txa)
txa.select()
let res = document.execCommand('copy')
document.body.removeChild(txa)
console.log('copy success')
}