vue.js implements printer connection

零到壹度
Release: 2018-03-26 10:16:07
Original
5229 people have browsed it

This article mainly introduces how to connect the printer with vue.js. The article introduces it in detail through the sample code, which has certain reference and learning value. I hope it can help everyone.

hello word! //要打印的内容

printBtn(){ let newstr = document.getElementsByClassName('dialogCare')[0].innerHTML; console.log(newstr) window.document.body.innerHTML = newstr; let oldstr = window.document.body.innerHTML; window.print(); window.location.reload(); //解决打印之后按钮失效的问题 window.document.body.innerHTML = oldstr; return false; },
Copy after login

Related recommendations:

jquery connects to the printer

API connects to the printer

JAVA connects to printer to print receipt

The above is the detailed content of vue.js implements printer connection. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!