https://www.w3schools.com/js/tryit.asp?filename=tryjs_event_onclick <!DOCTYPE html> <html> <body> <button onclick="this.innerHTML=Date()">The time is?</button> </body> </html> ' Oppure scrive la data https://www.w3schools.com/js/tryit.asp?filename=tryjs_events1 <!DOCTYPE html> <html> <body> <p>Click the button to display the date.</p> <button onclick="displayDate()">The time is?</button> <script> function displayDate() { document.getElementById("demo").innerHTML = Date(); } </script> <p id="demo"></p> </body> </html> |