Posts

How to use method JavaScript Print #8

avatar of @razaoktafian
25
@razaoktafian
·
0 views
·
1 min read

hello everyone, it's back again in my article raza oktafian, today I will discuss how to display the print command on the web using the javascript programming language again, but in this article I don't provide much information because the explanation for the print command script is very easy. and just look at the discussion below.

for the command we will use, namely " window.print () " which this command will directly tell us to print the web page we are opening now, for the combination I use " button onclick " which is where this works so that when we run the script will display the buntton first so we can directly press it and it will run to print the web page.

in the picture above I created a web page using the "window.print()" method and by adding a "button click" where the script above is a simple script for tutorial materials only, if you want to develop it again you can directly make it yourself at home or on campus when you are resting.

in the picture above is the result of my run and the result is that there are no errors and everything runs smoothly and when I press the "print this page" button, I immediately get a notification for us to print the web page.

That's all from today's article about discussing methods for displaying the print command in the Javascript programming language. see you again in the next article.