Dynamisch erzeugte Dokumente

<script> function openwin() { newwin = window.open("", "", "toolbar=no,location=yes,directories=no,menubar=yes,width=300,height=200"); output = "<body>\n"+ "<h1>Sie haben eingegeben : </h1>\n"+ this.document.forms[0].elements[0].value +"\n"+ "<p>\n"+ "</body>\n"; newwin.document.write(output); } function openfullwin() { newwin = window.open("", "", "toolbar=no,location=yes,directories=no,menubar=yes,width=AvailWidth,height=AvailHeight"); output = "<body>\n"+ "<h1>Sie haben eingegeben : </h1>\n"+ this.document.forms[0].elements[0].value +"\n"+ "<p>\n"+ "</body>\n"; newwin.document.writeln(output); } function closewin() { newwin.close(); } </script> <form> <textarea rows=3 cols=60 wrap=physical> Dies ist ein Beispieltext fuer ein dynamisch erzeugtes Fenster </textarea><p> <input type="button" value="kleines Fenster" onclick="openwin()"> <input type="button" value="volles Fenster" onclick="openfullwin()"> <input type="button" value="Fenster zu" onclick="closewin()"> </form>