Copiar código del código de la siguiente manera:
<%@page lenguaje = "java" contentType = "text/html; charset = utf-8"
PageEncoding = "UTF-8"%>
<!
<html>
<Evista>
<title> JavaScript Print-Print Page Configuración de presente Código de vista previa </title>
<Meta http-oquiv = content-type content = "text /html; charset = gb2312" />
<Style media = print>
.Noprint {display: none;}
.PageNext {Page-Break-después: Always;}
</style>
<Script Language = JavaScript>
fuinction propSetUp () {
// Configuración de la página de impresión
wb.execwb (8,1);
}
fuinction propREView () {{)
// Vista previa de la página de impresión
wb.execwb (7,1);
}
Función printit ()
{{
if (confirmar ('¿estás impreso?') {
WB.EXECWB (6,6)
}
}
</script>
</ablo>
<Body>
<Div align = Center>
<Object id = wb height = 0 width = 0
classID = CLSID: 8856F961-340A-11D0-A96B-004FD705A2 Nombre = WB> </bject>
<Input onClight = javaScript: printit () type = button value = print name = button_print />
<Input onClight = javaScript: imprensador ();
<Input onClight = javaScript: printPreview ();
</div>
111 </br>
111 </br>
111 </br>
<div> </div>
222 </br>
222 </br>
222 </br>
<div> </div>
333 </br>
333 </br>
333 </br>
<div> </div>
444 </br>
444 </br>
444 </br>
<div> </div>
555 </br>
555 </br>
555 </br>
</body>
</Html>
Copiar código del código de la siguiente manera:
<html>
<title> JS Paging Batch Printing Solution (solo admite es decir) </title>
<script language = "javaScript">
Función printWithalert () {
document.all.webbrowser.execwb (6,1);
}
Función printwithoutorert () {
document.all.webbrowser.execwb (6,6);
}
fuinction propSetUp () {
document.all.webbrowser.execwb (8,1);
}
función propPrieview () {
document.all.webbrowser.execwb (7,1);
}
function imprimeMdiataty () {
document.all.webbrowser.execwb (6,6);
window.close ();
}
</script>
<Object id = webbrowser classID = clsid: 8856f961-340a-11d0-a96b-004fd705a2 style = "Display: Ninguno">
</Objeto>
</roscript>
<Style media = print>
.Noprint {visual
</style>
<TABLE ALIGN = "Center" class = NotRint>
<tr>
<td align = "center"> <button title = print onClick = printWithalert ()> imprimir </botón>
<Button title = imprimir directamente onClick = printwithoutorert ()> imprimir directamente </boton>
<input type = button value = "Impresión de la configuración" onClick = "imprampado ()">
<Button OnClick = 'printPreieview ()' title = 'Print Preview ...'> Imprimir vista previa </boton> </td>
</tr>
</table>
<Div class = NotRint> A continuación se muestra el área de impresión: <br>
</div>
<hr size = 1 noshadow color = negro class = noprint>
<Table>
<tr>
<td colorpan = 2>
El contenido de la primera página
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111. 111111111111111111111111111111 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111. 1111111111111111111111111111111111111111111111111111111111111111111111111111111111
</td>
</tr>
</table>
<hr size = 1 noshadow color = negro class = noprint>
<div>
Contenido de la segunda página
1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111. 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111. 1111111111111111111111111111111111111111111111111111111111111111111111111111111111
</div>
<hr size = 1 noshadow color = negro class = noprint>
Contenido de tercera página
</html>