![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
05/04/2002, 02:36
|
![Avatar de Kaopectate](http://static.forosdelweb.com/customavatars/avatar14704_1.gif) | Colaborador | | Fecha de Ingreso: diciembre-2001 Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 23 años, 1 mes Puntos: 38 | |
Re: como crear un boton que imprima la pagina actual Estudia este ejemplo:
Código:
<html>
<head>
<script language="JavaScript">
function imprimir(){
vimpre=window.open('impres.html', 'vimpre', 'scrollbars,resizable,width=700,height=500,');
vimpre.document.open();
vimpre.document.write("<html><head><title>titulo</title></head><body onload='print()'>");
vimpre.document.write("texto</body></html>");
vimpre.document.close();
}
</script>
</head>
<body>
<input type="button" value="Imprimir" onclick="imprimir()">
</body>
</html>
Suerte. |