Vue.js Window Print

We can use window print method to print the current window page. Here in this tutorial, we are going to explain how you can use JavaScript Window Print method.

Vue.js Window Print Method Example

We can use window.print() method to print the current window in vue.js-


<div id="app">
	<button @click="printWindow()">Print</button>
 new Vue({
 el: '#app',
  data: {
    printWindow: function () {		


Try it »

Output of above example-


User Ans/Comments

<div id="app"> &lt;button @click="printWindow()" v-text="'Print'" /&gt; </div>[removed] new Vue({ el: '#app', methods: { printWindow() { window.print(); }, } }); [removed]

Add Comment

📖 Read More