Scenario:
We are getting some simpler task some days and we learn new things about technology or language which is always there, but we are never aware of it. We use it sometimes too but unaware how it is working until you need to develop it.
So we have a simple request that client wants print functionality in page. No big deal. JavaScript provides such functionality with simple command "window.print();". Just use below code and you are good to go:
Code:
<button onclick="window.print();">Print this page</button>
Note:
All browsers use their own way of printing. So the user experience will be different.
Reference:
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_print
Subscribe to:
Post Comments (Atom)
-
Recently I was working with search bar in search result page where I encounter below error: Sorry, Something went wrong An error occurred...
-
SharePoint Designer 2013 – a tool that is most useful few years back, still handy in some projects, and that still gives me trouble when nee...
-
In last blog we learn how can we enable footer on SharePoint Online Modern Communication site. If you have not gone through that you can use...
Most of us get sucked into gambling through the 온라인카지노 fantasy of winning big—and that is certainly a chance. But games like poker and blackjack take a while to be taught and much longer to master, making games of probability a little extra interesting for newbies. Slots are certainly extra approachable and simpler to play, which has helped turn them into one of the engaging choices for newbies visiting a casino. If you find yourself|you finish up} camped out on the slots, nevertheless, you will need to know every thing there is be} to know—including the slot machine secrets and techniques that casinos would quite not disclose. To allow you to out, we consulted gambling specialists to get perception on what you otherwise could be missing. Read on to be taught the truth about slot machines before your subsequent journey to Vegas.
ReplyDelete