Answers for "copyright year javascript"

1

javascript display year copyright

<script>document.write(new Date().getFullYear())</script>
Posted by: Guest on March-23-2021
0

get year javascript copyright

<script type="text/JavaScript"> var theDate=new Date() document.write(theDate.getFullYear()) </script>
Posted by: Guest on January-05-2021
1

auto update copyright year javascript

<div class="copyright">
  <footer>Copyright © <span id="year"></span> , All rights reserved to X</footer>
</div>
<script>
  
  function getCurrentYear() {
    return new Date().getFullYear(); // returns the year via local timing
  };

  document.getElementById("year").innerHTML = getCurrentYear(); 
  //changing the inner html of the span with "year" id to the given year(2021)
</script>
Posted by: Guest on February-02-2021

Code answers related to "copyright year javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language