Created
March 19, 2015 03:24
-
-
Save okuden-labo/9423c458eff3f696fe77 to your computer and use it in GitHub Desktop.
JQueryでコピーライトの年号を自動更新
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* javascriptのコード */ | |
function copyright(){ | |
myDate = new Date(); | |
myYear = "Copyright © "+myDate.getFullYear()+" Company Name Allrights Reserved."; | |
document.write(myYear); | |
} | |
/* htmlのコード */ | |
<script type="text/javascript">copyright();</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment