Print Button Code in PHP with Html Code

Print button code in PHP:–  Now We are going to tell you how we can print a page with the example on one click and you can also get code it. We will also design the page. you can also see the code given below.

Print Button Code in PHP

How can we do this code and print out the entire page with this function?. So we will also show the output of this page.

<button onClick=”window.print()”>Print</button>

Now By doing this function which is given above us, you can print it out. So also providing full-page Html code with print button PHP

<html>

<style>

body{

background-color: #000;

}
button {
color: #fff;
background-color: #ff00b1;
padding: 17px 42px 14px 42px;
margin: 30px;
}
div {
margin: 50px;
width: 50%;
text-align: center;
marfin: 55px;
font-size: 20px;
background-color: #000;
color: #fff;
}
</style>
<head>
<title>check</title>
</head>
<body>
<div style=”float:right”>
<button onClick=”window.print()”>Print</button>
</div>
<div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>
</body>
</html>

Output:-

Print Button Code in PHP

print button Html code

Now you can see the example above and the code you can do it by this, you are on every browser. we have tried to understand you by using and designing HTML. So please check this code above you also Will get Html syntax

<html>
<head>
<title> Print Button </title>
</head>
<body>
<button onClick=”window.print()”>Print</button>
</body>
</html>

Conclusion

Any query related to this article, if your comment box from us, we have completely defined the task. you will definitely get your solution and you can also know the relative information from our blog please visit other on this link WordPress themes vs templates

Updated: October 6, 2019 — 10:15 am

Leave a Reply

Your email address will not be published. Required fields are marked *

Web Learn Smart © 2019 Frontier Theme