<style type="text/css" media="print">...</style>
ASKER
<html><title>No headers or footers</title><head>
<!-- ............ Attempt #1 ....................... -->
<style type="text/css" media="print">...</style>
<!-- ............ Attempt #2 ....................... -->
<style>
@media print {
.header, .hide { visibility: hidden }
}
</style>
<!-- ............ Attempt #3 ....................... -->
<style>
@media print {
#header, #footer {display:none;}
}</style>
<!-- ............ Attempt #4 ....................... -->
<style>
@media print
{
.noprint { display: none; }
} </style>
<!-- ............ Attempt #5 ....................... -->
<style>
@media print
{
.yourheader, .yourfooter {display:none;}
} </style>
</head>
<body>
Content
<P><input type='button' onClick="window.print()" class='hide'
value='Print'/>
</body>
</html>
ASKER
ASKER
ASKER
ASKER
JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.
TRUSTED BY
when i want to give the user the option to print, i have them click a link or button, which brings me to another page, which is basically the same page, except there's a variable in the page that I use to determine which sections I want to print.
if you're asking about whether there's a way to do it with the generic print function within browser, then no, you will need to build your own custom print function to accomplish this