Næh, såmænd ikke. Men når man begynder at skrive i et document, der er fiks
og færdig, så laver en fornuftig browser et nyt dokument. I det nye dokument er
der ingen af de gamle funktioner, som så ikke kan kaldes. Men det er nu en
smal sag at få funktionerne med i de document.write, der skal laves. Du kan
afteste, og hente, nedenstående på
http://www.hasselager.net/skriv.htm Undskyld det ser lidt uoverskueligt ud her på eksperten.dk:
<html>
<head>
<title>hej</title>
</head>
<body>
<script language="javascript">
function done() {
document.open();
document.write('opening file....<br>');
document.write('writing document....<br>');
document.write('finishing document....<br>');
document.write('Done....');
document.close();
}
function write() {
document.open();
document.write('<html><head><title>hej2</title></head>\n');
document.write('<script language="JavaScript">');
document.write(' function finish() {');
document.write(' document.open();');
document.write(' document.write("<html><head><title>hej2</title></head>");');
document.write(' document.write("<script language=\\"JavaScript\\">");');
document.write(' document.write(" function done() {");');
document.write(' document.write(" document.open();");');
document.write(' document.write(" document.write(\\"<html><head><title>hej3</title></head><body>\\");");');
document.write(' document.write(" document.write(\\"opening file...<br>writing document...<br>finishing document...<br>Done...\\");");');
document.write(' document.write(" document.write(\\"</body></html>\\");");');
document.write(' document.write(" document.close();");');
document.write(' document.write(" }");');
document.write(' document.write("</sc");document.write("ript>");');
document.write(' document.write("<body>");');
document.write(' document.write("opening file...<br>");');
document.write(' document.write("writing document...<br>");');
document.write(' document.write("finishing document...");');
document.write(' document.write("</body></html>");');
document.write(' document.close();');
document.write(' setTimeout("done()",1667);');
document.write('}');
document.write('</sc'+'ript>');
document.write('<body>');
document.write('opening file....<br>');
document.write('writing document....');
document.write('</body></html>\n');
setTimeout("finish()",1667);
document.close();
}
document.write('opening file....');
setTimeout("write()",1666);
</script>
</body>
</html>