Kan ikke få denne kode til at virke hvad er der galt med den:
<script language="JavaScript">
<!-- Original: Kurt Grigg (kurt.grigg@virgin.net) -->
<!-- Web Site:
http://website.lineone.net/~kurt.grigg/javascript -->
<!-- Begin
if (document.all) {
//Things you can alter
yourLogo = "SKRIV DIN TEKST HER "; //Not less than 2 letters!
logoFont = "Arial";
logoColor = "000000";
//Nothing needs altering below!
yourLogo = yourLogo.split('');
L = yourLogo.length;
TrigSplit = 360 / L;
Sz = new Array()
logoWidth = 100;
logoHeight = -30;
ypos = 0;
xpos = 0;
step = 0.03;
currStep = 0;
document.write('<div id="outer" style="position:absolute;top:0px;left:0px"><div style="position:relative">');
for (i = 0; i < L; i++) {
document.write('<div id="ie" style="position:absolute;top:0px;left:0px;'
+'width:10px;height:10px;font-family:'+logoFont+';font-size:12px;'
+'color:'+logoColor+';text-align:center">'+yourLogo[i]+'</div>');
}
document.write('</div></div>');
function Mouse() {
ypos = event.y;
xpos = event.x - 5;
}
document.onmousemove=Mouse;
function animateLogo() {
outer.style.pixelTop = document.body.scrollTop;
for (i = 0; i < L; i++) {
ie[i].style.top = ypos + logoHeight * Math.sin(currStep + i * TrigSplit * Math.PI / 180);
ie[i].style.left = xpos + logoWidth * Math.cos(currStep + i * TrigSplit * Math.PI / 180);
Sz[i] = ie[i].style.pixelTop - ypos;
if (Sz[i] < 5) Sz[i] = 5;
ie[i].style.fontSize = Sz[i] / 1.7;
}
currStep -= step;
setTimeout('animateLogo()', 20);
}
window.onload = animateLogo;
}
// End -->
</script>
og heller ikke denne:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="da">
<head>
<title>Nedtælling til AKDK 1 års fødselsdag</title>
<script type="text/javascript">
<!-- Dette script og mange flere -->
<!-- findes hos
http://www.html.dk -->
<!-- Start
var now = new Date();
var event = new Date("may 10 2005 00:46:00");
var seconds = (event - now) / 1000;
var minutes = seconds / 60;
var hours = minutes / 60;
var days = hours / 24;
ID=window.setTimeout("update();", 1000);
function update() {
now = new Date();
seconds = (event - now) / 1000;
seconds = Math.round(seconds);
minutes = seconds / 60;
minutes = Math.round(minutes);
hours = minutes / 60;
hours = Math.round(hours);
days = hours / 24;
days = Math.round(days);
document.getElementById('days').value = days;
document.getElementById('hours').value = hours;
document.getElementById('minutes').value = minutes;
document.getElementById('seconds').value = seconds;
ID=window.setTimeout("update();",1000);
}
// Slut -->
</script>
</head>
<body>
<h1>Nedtælling til nytårsaften</h1>
<p>Der er <input type="text" id="days" value="0" style="width:75px;" /> dage til nytårsaften<br />
Der er <input type="text" id="hours" value="0" style="width:75px;" /> timer til nytårsaften<br />
Der er <input type="text" id="minutes" value="0" style="width:75px;" /> minutter til nytårsaften<br />
Der er <input type="text" id="seconds" value="0" style="width:75px;" /> sekunder til nytårsaften</p>
</body>
</html>
Hvad er der galt med dem?