To answer your question: Will will add a copyright notice as the last element on the page.
(function(){ // create almost any element this way... var el = document.createElement("div"); // add some text to the element... el.innerHTML = "Copyright © 2004-"+ (new Date).getFullYear() + " flip-flop media"; // "document.body" can be any element on the page. document.body.appendChild(el); }());
You can always change "document.body" to any element that you want to use. For example, document.getElementById("copyright").appendChild(el);
JQuery
You already have jQuery on the page. So just use:
$(function(){
What you should do:
Use server technologies like php, .net etc.
You are probably using php on your server, which means the following should work anywhere on your page (if it has the php extension (index.php instead of index.html), of course):
<?php echo 'copyright © 2004-' + date("Y") . ' flip-flop media'; ?>
source share