• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
JavaScriptSource

JavaScriptSource

Search 5,000+ Free JavaScript Snippets

  • Home
  • Browse Snippets
    • Addon
    • Ajax
    • Buttons
    • Cookies
    • CSS
    • Featured
    • Forms
    • Games
    • Generators
    • Image Effects
    • Math Related
    • Miscellaneous
    • Multimedia
    • Navigation
    • Page Details
    • Passwords
    • Text Effects
    • Time & Date
    • User Details
Home / Page Details / Copyright Notice

Copyright Notice

General

This unobtrusive script will update the current year for the copyright notice on a page. No need to worry about changing it from year to year. Very easy to implement.

Copyright © 2002-… by Acme Corporation. All rights reserved

Notes

  • Created by: Spike McLarty
  • Web Site: http://www.dosadi.com/
  • Posted: September 26, 2008

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: copyNote.js

/* This script and many more are available free online at
The JavaScript Source!! http://javascriptsource.com
Created by: Spike McLarty | http://www.dosadi.com/ */

function copyDate() {
  var cpyrt = document.getElementById(“copyright”)
  if (cpyrt) {
     cpyrt.firstChild.nodeValue = (new Date()).getFullYear();
  }
}

window.onload = copyDate;

Head

Paste this code into the HEAD section of your HTML document.

<script type=”text/javascript” src=”copyNote.js”></script>

Body

Paste this code into the BODY section of your HTML document.

Copyright © 2002-<span id=”copyright”>…</span> by Acme Corporation. All rights reserved

Page Details

Related Snippets:

  • Check If the Document is Ready
  • Delayed Image Loader
  • Return the current URL
  • Get the Width and Height of the Window

Primary Sidebar

Popular Posts

Story Generator

IP Grabber – get a users IP address with JavaScript

Simple Calendar

Remove Ads

Astrological Calculator

Copyright © 2025 JavaScriptSource.com

  • About
  • Privacy Policy
  • FAQ
  • Jobs For Developers