到這裡下載示例代碼
< div id=
< a _blank
< img src=
< /a>
< /div>
< SCRIPT LANGUAGE=
< !
var xPos =
var yPos = document
var step =
var delay =
var height =
var Hoffset =
var Woffset =
var yon =
var xon =
var pause = true;
var interval;
img
function changePos() {
width = document
height = document
Hoffset = img
Woffset = img
img
img
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos
}
if (yPos <
yon =
yPos =
}
if (yPos >= (height
yon =
yPos = (height
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos
}
if (xPos <
xon =
xPos =
}
if (xPos >= (width
xon =
xPos = (width
}
}
function start() {
img
interval = setInterval(´changePos()´
}
start();
// End
< /script >
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19424.html