screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html lang="en"> <head> <script> document.addEventListener('DOMContentLoaded', function () { const currentDate = new Date(); const currentYear = currentDate.getFullYear(); document.getElementById('currentYear').textContent = currentYear; }); </script> </head> <body> <h3>Js Get Current Year</h3> <p>Current Year: <span id="currentYear"></span></p> </body> </html>