summaryrefslogtreecommitdiff
path: root/ima.js
diff options
context:
space:
mode:
Diffstat (limited to 'ima.js')
-rw-r--r--ima.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/ima.js b/ima.js
new file mode 100644
index 0000000..4cd22ac
--- /dev/null
+++ b/ima.js
@@ -0,0 +1,29 @@
+function ima(id)
+{
+ date = new Date;
+ year = date.getFullYear();
+ month = date.getMonth();
+ months = new Array('1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12');
+ d = date.getDate();
+ day = date.getDay();
+ days = new Array('日', '月', '火', '水', '木', '金', '土');
+ h = date.getHours();
+ if(h<10)
+ {
+ h = "0"+h;
+ }
+ m = date.getMinutes();
+ if(m<10)
+ {
+ m = "0"+m;
+ }
+ s = date.getSeconds();
+ if(s<10)
+ {
+ s = "0"+s;
+ }
+ result = '('+days[day]+')・'+year+'年'+months[month]+'月'+d+'日';
+ document.getElementById(id).innerHTML = result;
+ setTimeout('ima("'+id+'");','1000');
+ return true;
+} \ No newline at end of file