Created
September 1, 2014 07:54
-
-
Save theshahzaib5/b89338444d2ad1fb319a to your computer and use it in GitHub Desktop.
jquery get current year
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Jquery</title> | |
<style type="text/css"> | |
</style> | |
<script type="text/javascript" src="jquery-1.11.1.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function(e) { | |
footerUpdateDate(); | |
}); | |
function footerUpdateDate(){ | |
var d = new Date(); | |
$("span.year").text(d.getFullYear()) | |
} | |
</script> | |
</head> | |
<body> | |
<span class="year">2011</span> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment