<div id="img" style="position:absolute; border:solid #666666 1px;">
<div style="background:#0099FF; color:#FFFFFF; padding-right:5px; text-align:right; cursor:hand; border-bottom:solid #999999 1px;" onClick="javascript:img.style.visibility='hidden'"><strong>×</strong></div>
<a href="http://perfoto.com.cn" target="_blank"><img src="img/1056.gif" border=0 align='absmiddle' onload='javascript:if(this.width>screen.width-screen.width/1.5) this.style.width=screen.width-screen.width/1.5'></a>
</div>
<SCRIPT LANGUAGE="JavaScript">
var xPos = 800;
var yPos = 20;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.top = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
}
}
function start() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
start();
</script>
在傲游里打开网页不久广告便自动消失了(左下角提示javascript Error),不知什么原因。
但在IE里便没出现这问题,是这代码有问题还是什么原因????
不是我故意在这边发,而是javascript那边没人理
http://bbs.bc-cn.net/viewthread.php?tid=167859
不是故意重发的,版主留情啊~~