function clock() { if (!document.layers && !document.all) return; var digital = new Date(); var hours = digital.getHours(); var minutes = digital.getMinutes(); var seconds = digital.getSeconds();
if (hours == 0) hours = 12; if (minutes <= 9) minutes = "0" + minutes; if (seconds <= 9) seconds = "0" + seconds; dispTime = hours + ":" + minutes + ":" + seconds; var months=new Array(13); months[1]="januar"; months[2]="februar"; months[3]="marts"; months[4]="april"; months[5]="maj"; months[6]="juni"; months[7]="juli"; months[8]="august"; months[9]="september"; months[10]="oktober"; months[11]="november"; months[12]="december"; var time=new Date(); var lmonth=months[time.getMonth() + 1]; var date=time.getDate(); var year=time.getYear(); if (year < 2000) year = year + 1900; var alldate=date + ". " + lmonth + " " + year; datetime = "<p>" + alldate + " " + dispTime + "</p>"; pendule.innerHTML = datetime; if (document.layers) { document.layers.pendule.document.write(datetime); document.layers.pendule.document.close(); } else if (document.all)
function clock() { if (!document.layers && !document.all) return; var digital = new Date(); var hours = digital.getHours(); var minutes = digital.getMinutes(); var seconds = digital.getSeconds();
if (hours == 0) hours = 12; if (minutes <= 9) minutes = "0" + minutes; if (seconds <= 9) seconds = "0" + seconds; dispTime = hours + ":" + minutes + ":" + seconds; var months=new Array(13); months[1]="januar"; months[2]="februar"; months[3]="marts"; months[4]="april"; months[5]="maj"; months[6]="juni"; months[7]="juli"; months[8]="august"; months[9]="september"; months[10]="oktober"; months[11]="november"; months[12]="december"; var time=new Date(); var lmonth=months[time.getMonth() + 1]; var date=time.getDate(); var year=time.getYear(); if (year < 2000) year = year + 1900; var alldate=date + ". " + lmonth + " " + year; datetime = "<p>" + alldate + " " + dispTime + "</p>"; pendule.innerHTML = datetime; if (document.layers) { document.layers.pendule.document.write(datetime); document.layers.pendule.document.close(); } else if (document.all)
Paste den kode der, i et tomt dokument. Så ka du selv lege med det. Det der kommer med formatet: Dato. Månede HH:MM:SS Det er bgo's kode, blot konfigureret færdig, så jeg ville give ham pointene. Mvh. Anders P.S: Det er som benson sagde er javascript clientside, så brugeren får vist sin egen dato/tid.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.