Hola juandedios.
Prueba esto:
Código PHP:
<html>
<head>
<script language="JavaScript">
var oWnd;
function envia(){
oWnd = open('');
with (oWnd.document){
open();
writeln("<html>");
writeln(" <head>");
writeln(" </head>");
writeln(" <body>");
writeln(" No deberías hacer todo lo que te piden");
writeln(" </body>");
writeln("</html>");
close();
}
setTimeout("cierra()", 3000);
}
function cierra(){
oWnd.close();
}
</script>
</head>
<body>
<form name="frm">
<input type="button" name="boton" value="Haz click aqui" onclick="envia()">
</form>
</body>
</html>
Saludos.