https://www.w3schools.com/js/tryit.asp?filename=tryjs_output_write <!DOCTYPE html> <html> <body> <h2>My First Web Page</h2> <p>My first paragraph.</p> <p>Never call document.write after the document has finished loading. It will overwrite the whole document.</p> <script> document.write(5 + 6); </script> </body> </html> ' L'uso di Button e document.write () dopo il caricamento di un documento HTML, cancellera' tutto il codice HTML esistente : https://www.w3schools.com/js/tryit.asp?filename=tryjs_output_write_over <!DOCTYPE html> <html> <body> <h2>My First Web Page</h2> <p>My first paragraph.</p> <button type="button" onclick="document.write(5 + 6)">Try it</button> </body> </html> |