script get year code example
Example 1: javascript code for year in html
<script type="text/javascript">
document.write(new Date().getFullYear());
</script>
Example 2: how to get the year in javascript
new Date().getFullYear(); // This will get you the current year
Example 3: get year from date javascript
document.write(new Date().getFullYear());
Example 4: get year javascript copyright
<script type="text/JavaScript"> var theDate=new Date() document.write(theDate.getFullYear()) </script>