Search
 
SCRIPT & CODE EXAMPLE
 

HTML

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>
Comment

PREVIOUS NEXT
Code Example
Html :: fullpage cdn 
Html :: json placeholder limit 
Html :: ver pdf html5 
Html :: disable autoplay in html iframe 
Html :: html image googe drive 
Html :: html star symbol 
Html :: html ö 
Html :: bootstrap bold 
Html :: href phone 
Html :: html implement button send email 
Html :: how to add image caption in markdwon 
Html :: align image center of webpage 
Html :: bold in bootstrap 
Html :: Add fav icon to browser tab 
Html :: set textbox into center of div in bootstrap 
Html :: html input color picker 
Html :: spawn mob without ai 
Html :: import image in html 
Html :: ionic onfig.xml hide loader 
Html :: hint text html 
Html :: accept only numbers in textbox 
Html :: input field image accept type 
Html :: pass text from input field to javascript function 
Html :: html lag on scoll 
Html :: how to redirect to gmail with a tag html 
Html :: html schrift dicke 
Html :: change color on the same string html 
Html :: open link in a new tab 
Html :: html dot 
Html :: iframe responsive 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =