Dynamic Copyright Page
Overview
In this assignment you'll use JavaScript to add a dynamic copyright notice to your How-To article.
Assignment
-
Create a new javascript file.
-
Correctly link that file to your How-To article page using a
<script>
tag. -
Add an empty
<div>
tag to the bottom of the html page with a uniqueid
. -
Write the necessary JavaScript so that the text "Copyright: ", along with the current date in the format
mm-dd-yyyy
appears inside the div tag when the page loads. -
Make sure your copyright div is correctly styled with CSS to make it easily visible.
-
Update the table of contents link on your index page if necessary.
-
Submit the url to your github pages site to MySVU. (This should be something like https://USERNAME.github.io/REPOSITORYNAME).
Hints
-
You can see an example of a
Date
object being used on page 46 of the JavaScript text. -
You may also want to refer to the various Date Object Methods listed on this page.
-
Remember that you can
concatenate
, that is "stick together" text in JavaScript using the+
operator:
var number = 7;
var myString = "My favorite nunmber is " + number;