#12004/3/22 16:52:00
:confused:我想做一个在网页上活动的,浮动窗口,可是做出来窗口只会在一个地方停留,不会话动,请高手给看一下,指点一下,谢谢了!!!
<html>
<head>
<title>浮动</title>
</head>
<body>
<SCRIPT FOR=window EVENT=onload LANGUAGE="JScript">
initAd();
</SCRIPT>
<script language="JScript">
<!--
function initAd() {
document.all.AdLayer.style.posTop = -200;
document.all.AdLayer.style.visibility = 'visible'
MoveLayer('AdLayer');
}
function MoveLayer(layerName) {
var x = 600;
var y = 300;
var diff = (document.body.scrollTop + y - document.all.AdLayer.style.posTop)*.40;
var y = document.body.scrollTop + y - diff;
eval("document.all." + layerName + ".style.posTop = y");
eval("document.all." + layerName + ".style.posLeft = x");
setTimeout("MoveLayer('AdLayer');", 20);
}
//-->
</script>
<div id=AdLayer style='position:absolute; width:61px; height:59px; z-index:20; visibility:hidden;; left: 600px; top: 300px'>
<a href="http://www.5dmedia.com/bbs"><img src='../qqkk2000.gif' border="0" height="60" width="60"></a>
</div>
</body>
</html>