为什么广告它不移动?

xue964777 2004-11-24 10:58:55
<BODY bgColor="#103c73" leftMargin="0" topMargin="0">
<DIV language="javascript" id="dd" style="WIDTH: 135px; HEIGHT: 135px" align="left" noWrap>
<TABLE height="135" cellSpacing="0" cellPadding="0" width="135" border="0">
<TR>
<TD background="http://www.577job.com/ggpic/kfc.gif" height="135">
<DIV align="right">
<TABLE cellSpacing="0" cellPadding="0" width="50%" align="right" border="0">
<TR>
<TD align="center" height="123"><A href="http://www.577job.com/html/kfc.htm" target="_blank"><FONT color="#ffffff" size="2">餐厅<BR>
见习助理</FONT></A></TD>
</TR>
<TR>
<TD align="center" height="12"></TD>
</TR>
</TABLE>
</DIV>
</TD>
</TR>
</TABLE>
</DIV>
<script language="JavaScript">


var xPos = 20;

var yPos = 100;

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;

dd.style.top = yPos;

function changePos() {

width =500;

height =500;

Hoffset = dd.offsetHeight;

Woffset = dd.offsetWidth;

dd.style.left = xPos + document.body.scrollLeft;

dd.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() {


interval =setInterval('changePos()', delay);

}

function pause_resume() {

if(pause) {

clearInterval(interval);
pause = false;

}

else {

interval = setInterval('changePos()',delay);

pause = true;

}

}

start();
pause_resume();
</script>
</BODY>
...全文
65 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
JK_10000 2004-11-24
  • 打赏
  • 举报
回复
<BODY bgColor="#103c73" leftMargin="0" topMargin="0">
<DIV language="javascript" id="dd"
style="position:relative;top:expression(this.offsetParent.scrollTop+20);left:expression(this.offsetParent.scrollLeft+50)" align="left" noWrap>
 

<TABLE height="135" cellSpacing="0" cellPadding="0" width="135" border="0">
<TR>
<TD background="http://www.577job.com/ggpic/kfc.gif" height="135">
 
<DIV align="right">
<TABLE cellSpacing="0" cellPadding="0" width="50%" align="right" border="0">
<TR>
<TD align="center" height="123"><A href="http://www.577job.com/html/kfc.htm" target="_blank"><FONT color="#ffffff" size="2">餐厅<BR>
见习助理</FONT></A></TD>
</TR>
<TR>
<TD align="center" height="12"></TD>
</TR>
</TABLE>
</DIV>
</TD>
</TR>
</TABLE>
</DIV>



f
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
<p>f</p>
</BODY>
xue964777 2004-11-24
  • 打赏
  • 举报
回复
我解决了

87,994

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧