实现打印功能

实现打印功能

handlePrint() {
    let printContent = document.getElementById('formModel').innerHTML;
    let originalContent = document.body.innerHTML;
    document.body.innerHTML = printContent;
    window.print();
    document.body.innerHTML = originalContent;
},

你可能感兴趣的:(前端,javascript,开发语言)