Hello: Please, I want to print a page of my site ... 1 - Automatic without pressing the Print button. 2 - without displaying the header and footer. Please help me
You can't control the header and footer printing with JavaScript. That's a user-only setting in the browser.
see here how to print part of a page or exclude some elements: http://www.techtricky.com/print-part-of-page-javascript/
If you like to use javascript then you may use this code for the purpose of creating print button for your webpage............ the code is given as below: <SCRIPT LANGUAGE="JavaScript"> if (window.print) {document.write('<form><input type=button name=print value="Print" onClick="window.print()"></form>');} </script>