Monday, 11/12/2017 | 9:39 UTC+5
Mehta Websolution's Blog

Print selected webpage data using Javascript

Many times we would like to place a button on webpage to print the content of that web page via an actual printer. JavaScript helps you to implement this functionality using the print function of window object.

The JavaScript print function window.print() prints the current web page when executed. You can call this function directly using the onclick event and also set which portion would be printed.

See the Example as below :

 

sometimes we want some portion of the page need to be print not a whole page,as per above example set id or class to portion which need to print (here #printthis).
when javascript function call on onclick then this function prints part of page which having data within #printthis div.

About

Mehta Websolution is a web development company based in Jamnagar, Gujarat, India. providing a full range of web services including web design, web development, web promotion, search engine optimization, web hosting and domain registration and all Internet services at accessible cost since it was established in 2007. A company which provides you a full range of web services Contact us for web design, web development, web promotion, search engine optimization, web hosting and domain registration at an affordable cost. IF you are looking for an IT Solutions Provider who can implement your Dreams in a reality form of exhaustive web applications, innovative software, and creative designs or for fastidious solutions and persistent services, you are at the right place. we provide you software development and web solutions all across the globe. Our strategic location and proven experience enables us to provide you with the best services and outsourcing for your Software Development, Web Development, E-commerce, Multimedia Presentations and Web Based Applications at the corporate level.

POST YOUR COMMENTS

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

eighteen − 18 =

Mehta Websolution Since 2007

Company is Government & Defence (Indian Navy, Army & Air Force) Approval I.T. Contractor, An ISO 9001:2008 Certified I.T. Company and Google Enterprise for Work Partner.