Ja, jeg har et men det er også bare et jeg har fundet.
<script LANGUAGE="JavaScript" type="text/javascript">
<!-- Hide
var timerID = null;
var timerRunning = false;
function stopclock()
{
if (timerRunning)
clearTimeout(timerID)
timerRunning = false;
}
function startclock()
{
stopclock();
showtime();
}
function getTimeValue(tid)
{
var hours = tid.getHours();
var minutes = tid.getMinutes();
var seconds = tid.getSeconds();
var timeValue = " " + hours;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
return timeValue;
}
function showtime()
{
var now = new Date();
document.clock.face.value = getTimeValue(now);
timerID = setTimeout("showtime()",1000);
timerRunning = true;
}
// -->
</script>
<script LANGUAGE="JAVASCRIPT" TYPE="text/javascript">
<!--Hide
function home_date() {
date = new Date();
var day_number = date.getDay();
var todays_date = date.getDate();
var month_number = date.getMonth();
var year = date.getYear();
var day_name = '';
var month_name = ''
if(day_number == 0){day_name = 'søndag';}
if(day_number == 1){day_name = 'mandag';}
if(day_number == 2){day_name = 'tirsdag';}
if(day_number == 3){day_name = 'onsdag';}
if(day_number == 4){day_name = 'torsdag';}
if(day_number == 5){day_name = 'fredag';}
if(day_number == 6){day_name = 'lørdag';}
if(month_number == 0){month_name = 'januar';}
if(month_number == 1){month_name = 'februar';}
if(month_number == 2){month_name = 'marts';}
if(month_number == 3){month_name = 'april';}
if(month_number == 4){month_name = 'maj';}
if(month_number == 5){month_name = 'juni';}
if(month_number == 6){month_name = 'juli';}
if(month_number == 7){month_name = 'august';}
if(month_number == 8){month_name = 'september';}
if(month_number == 9){month_name = 'oktober';}
if(month_number == 10){month_nme = 'november';}
if(month_number == 11){month_name ='december';}
if(year <= 100){year +=1900;}
var dateline = day_name + ' d. ' + todays_date + '. ' + month_name +
' ' + year + ' ';
document.write(dateline);
}
// End hide -->
</script>
<script type="text/javascript">
billede1 = new Image();
billede1.src = "images/apc_home_w.gif";
billede2 = new Image();
billede2.src = "images/apc_home_r.gif";
function skiftbillede(img_name,img_src) {
document[img_name].src=img_src;
}
</script>
I <BODY> skal du så skrive: onLoad="startclock()"
eks.:
<body onLoad="startclock()">
Og der hvor du vil have uret til at vises på siden skal du bruge en
form.
eks.:
<form name="clock">
<input id="clock" type="text" name="face" value="00:00:00" size="20>
</form>
Held og lykke!
Venlig Hilsen Preben
--
Vil du lære at kode HTML, XHTML, CSS, SSI eller ASP ???
- Pædagogiske tutorials på dansk
- Kom godt i gang med koderne
KLIK HER! =>
http://www.html.dk/tutorials