file_refresh_after_document_write.html (231B)
1 <html> 2 <head> 3 <title></title> 4 </head> 5 <script> 6 function write_and_refresh(){ 7 document.write("This could be anything"); 8 location.reload(); 9 } 10 </script> 11 <body> 12 <button id='test_btn' onclick='write_and_refresh()'> 13 </body> 14 15 </html>