gistlib
<!DOCTYPE html> <html> <head> <title>Counter</title> </head> <body> <h1 id="counter">0</h1> <button onclick="incrementCounter()">Increase Count</button> <script> let count = 0; function incrementCounter() { count++; document.getElementById("counter").innerText = count; } </script> </body> </html> 375 chars19 lines
<!DOCTYPE html> <html> <head> <title>Counter</title> </head> <body> <h1 id="counter">0</h1> <button onclick="incrementCounter()">Increase Count</button> <script> let count = 0; function incrementCounter() { count++; document.getElementById("counter").innerText = count; } </script> </body> </html>
gistlibby LogSnag