First commit.
A simple webclock written in PHP, HTML, and js. No CSS is provided.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
|
||||
window.onload = startInterval;
|
||||
function startInterval(){
|
||||
setInterval("startTime();",1000);
|
||||
}
|
||||
|
||||
function startTime(){
|
||||
var current_time = new Date();
|
||||
var formated_time = current_time.getHours() + ":"
|
||||
+ current_time.getMinutes() + ":"
|
||||
+ current_time.getSeconds();
|
||||
document.getElementById('time_title').innerHTML = "Time is: " + formated_time;
|
||||
document.getElementById('time_body').innerHTML = Date();
|
||||
document.getElementById('time_test').innerHTML = current_time.getDate();
|
||||
}
|
||||
Reference in New Issue
Block a user