Чтобы ответить на ваш вопрос:
добавит уведомление об авторских правах в качестве последнего элемента на странице.
(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);
}());
Вы всегда можете изменить «document.body» на любой элемент, который вы хотите использовать. Такие как document.getElementById("copyright").appendChild(el);
JQuery
У вас уже есть jQuery на странице.
Так что просто используйте:
$(function(){
// "body" is a css selector.
// you can use almost any css selector
// to find the element you need. e.g. $("#copyright")...
$("body").append("Copyright © 2004-"+ (new Date).getFullYear() + " flip-flop media");
// you can also use html() to replace the existing content.
// $("#copyright").html("content goes here");
});
Что вы должны сделать:
Использование серверных технологий, таких как php, .net и т. Д.
Вы, вероятно, запускаете php на своем сервере, что означает, что в любом месте вашей страницы должно работать следующее (если оно имеет расширение php (index.php вместо index.html), конечно):
<?php
echo 'copyright © 2004-' + date("Y") . ' flip-flop media';
?>