Created
August 5, 2011 17:52
-
-
Save rskull/1128098 to your computer and use it in GitHub Desktop.
今月のカレンダー
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
onload = function () { | |
var now = new Date(); | |
var y = now.getFullYear(); | |
var m = now.getMonth(); | |
document.write(y+'年'+m+'月<br>'); | |
for (i=1;i<=31;i++) { | |
var check = new Date(y, m, i); | |
if (check.getMonth() == m) { | |
var d = document.createTextNode(i); | |
document.body.appendChild(d); | |
if (i % 7 == 0) { | |
var b = document.createElement('br'); | |
document.body.appendChild(b); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment