NEED HELP

Status
This thread has been locked.
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

ZP4RKER

Feedback score
17
Posts
227
Reactions
79
Resources
0

Mark_ED

Feedback score
0
Posts
6
Reactions
1
Resources
0
It is JavaScript, aka you make a file saved as .js and link it from html by adding <script src="yourjsfile.js"></script> then you paste that code in the js file.[DOUBLEPOST=1515601094][/DOUBLEPOST]function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML =
h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}

that might work, not 100% sure.
 
Last edited:

Depolarize

Feedback score
5
Posts
15
Reactions
13
Resources
0
It is JavaScript, aka you make a file saved as .js and link it from html by adding <script src="yourjsfile.js"></script> then you paste that code in the js file.[DOUBLEPOST=1515601094][/DOUBLEPOST]function startTime() {
var today = new Date();
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('txt').innerHTML =
h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}

that might work, not 100% sure.
didnt work :(
 

Mark_ED

Feedback score
0
Posts
6
Reactions
1
Resources
0
didnt work :(
For JavaScript
function date_time(id)
{
date = new Date;
year = date.getFullYear();
month = date.getMonth();
months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'Jully', 'August', 'September', 'October', 'November', 'December');
d = date.getDate();
day = date.getDay();
days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
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]+' '+months[month]+' '+d+' '+year+' '+h+':'+m+':'+s;
document.getElementById(id).innerHTML = result;
setTimeout('date_time("'+id+'");','1000');
return true;
}


For HTML
Put this in the body, might work now. otherwise I won't know xD

<span id="date_time"></span>
<script type="text/javascript">window.onload = date_time('date_time');</script>
 

Depolarize

Feedback score
5
Posts
15
Reactions
13
Resources
0
For JavaScript
function date_time(id)
{
date = new Date;
year = date.getFullYear();
month = date.getMonth();
months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'Jully', 'August', 'September', 'October', 'November', 'December');
d = date.getDate();
day = date.getDay();
days = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
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]+' '+months[month]+' '+d+' '+year+' '+h+':'+m+':'+s;
document.getElementById(id).innerHTML = result;
setTimeout('date_time("'+id+'");','1000');
return true;
}


For HTML
Put this in the body, might work now. otherwise I won't know xD

<span id="date_time"></span>
<script type="text/javascript">window.onload = date_time('date_time');</script>
Didn't work again rip
 

ZP4RKER

Feedback score
17
Posts
227
Reactions
79
Resources
0

ZP4RKER

Feedback score
17
Posts
227
Reactions
79
Resources
0
But why is it disabled on that one?
The creator of the site probably thinks their ideas are unique and don't want it to be stolen, maybe? Honestly, I have no idea.
 

Orochimaru

The Love's Manager
Supreme
Feedback score
21
Posts
2,721
Reactions
1,352
Resources
3
The creator of the site probably thinks their ideas are unique and don't want it to be stolen, maybe? Honestly, I have no idea.
You can easily steal it..


So did you take their website and use it as your own or
 

ZP4RKER

Feedback score
17
Posts
227
Reactions
79
Resources
0
You can easily steal it..


So did you take their website and use it as your own or
I know you can still access the source. And are you asking me or the op? o_O
 
Status
This thread has been locked.
Top