Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/04/2002, 02:36
Avatar de Kaopectate
Kaopectate
Colaborador
 
Fecha de Ingreso: diciembre-2001
Ubicación: Curaçao (Antillas Holandesas)
Mensajes: 3.179
Antigüedad: 22 años, 4 meses
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.