/ Published in: JavaScript
Use case:
* Paste the javascrit BEFORE the closing body tag ``
* Paste the javascrit BEFORE the closing body tag ``
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Copyright © 1999 - <span id="current-year"></span> <script type="text/javascript"> function getCurrentYear(){ var d = new Date(); return d.getFullYear(); } el = document.getElementById('current-year'); el.innerHTML = getCurrentYear(); </script>