Windows XP Kan eksperterne forklare mig(begynderen), hvorfor det kun er <body onload="changeImage1(false)">der vises ved opload. Image 2-9 bliver først synlige når jeg klikker på dem?Alle images er 4 billeder roteret 90
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Katte_Puzzle</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<STYLE>.drag {
POSITION: relative; CURSOR: hand
}
.highlight {
BACKGROUND: #ffff00; COLOR: #6600ff; CURSOR: hand
}
</STYLE>
<script type="text/javascript">
function correctit(){
return true
}
window.onerror=correctit
var dragapproved=false
var z,x,y
function move(){
if (event.button==1&&dragapproved){
z.style.pixelLeft=temp1+event.clientX-x
z.style.pixelTop=temp2+event.clientY-y
return false
}
}
function drags(){
if (!document.all)
return
if (event.srcElement.className=="drag") {
dragapproved=true
z=event.srcElement
temp1=z.style.pixelLeft
temp2=z.style.pixelTop
x=event.clientX
y=event.clientY
document.onmousemove=move
}
}
document.onmousedown=drags
document.onmouseup=new Function("dragapproved=false")"></SCRIPT>
<script type="text/javascript">
//declare variables
var imageCount = 4;
var seconds = 1;
function changeImage1(createLoop){
//get the element
var img = document.getElementById("rotatingImage1");
//set the Image1 location to a random Image1 from 0 to Image1Count
img.src = "images/image1_" + parseInt(Math.random()*imageCount) + ".jpg";
//setTimeout call function at time from now in MS
if(createLoop){
setTimeout("changeImage1(true)", seconds * 1000);
}
}</SCRIPT>
<script type="text/javascript">
//declare variables
var imageCount = 4;
var seconds = 1;
function changeImage2(createLoop){
//get the element
var img = document.getElementById("rotatingImage2");
//set the image2 location to a random image2 from 0 to image2Count
img.src = "images/image2_" + parseInt(Math.random()*imageCount) + ".jpg";
//setTimeout call function at time from now in MS
if(createLoop){
setTimeout("changeImage(true)", seconds * 1000);
}
}</SCRIPT>
<SCRIPT language=JavaScript src="js/myrotate3.js"></SCRIPT>
<SCRIPT language=JavaScript src="js/myrotate4.js"></SCRIPT>
<SCRIPT language=JavaScript src="js/myrotate5.js"></SCRIPT>
<SCRIPT language=JavaScript src="js/myrotate6.js"></SCRIPT>
<SCRIPT language=JavaScript src="js/myrotate7.js"></SCRIPT>
<SCRIPT language=JavaScript src="js/myrotate8.js"></SCRIPT>
<SCRIPT language=JavaScript src="js/myrotate9.js"></SCRIPT>
<META name=GENERATOR content="MSHTML 8.00.6001.19222"></HEAD>
<body>
<div align=CENTER><h1>Katte Sliding med rotation.</h1>
<table border="3" cellpadding="0" cellspacing="1" width="620"
bordercolor="#FF0000" height="620">
<TBODY>
<TR>
<TD width="40%">
<Div align="center">
<body onload="changeImage1(false)">
<img id="rotatingImage1" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage1(false);" />
<body onload="changeImage2(false)">
<img id="rotatingImage2" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage2(false);" />
<body onload="changeImage3(false)">
<img id="rotatingImage3" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage3(false);" /><br>
<body onload="changeImage4(false)">
<img id="rotatingImage4" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage4(false);" />
<body onload="changeImage5(false)">
<img id="rotatingImage5" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage5(false);" />
<body onload="changeImage6(false)">
<img id="rotatingImage6" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage6(false);" /><br>
<body onload="changeImage7(false)">
<img id="rotatingImage7" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage7(false);" />
<body onload="changeImage8(false)">
<img id="rotatingImage8" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage8(false);" />
<body onload="changeImage9(false)">
<img id="rotatingImage9" name="image" src="" width="200" height="200"
style="FILTER: " id=myfilter class=drag onclick="changeImage9(false);" />
</DIV>
</BODY></HTML>