注册 登录
编程论坛 WEB前端(UI)

[求助]网页浮动广告问题

longziyong 发布于 2008-02-17 19:31, 1451 次点击
我想在网页的两侧增加浮动广告,广告代码如下:

<script language="javascript">var specialcode="<DIV id='searchspe' name='searchspe' style='Z-INDEX:100; right:15px; POSITION:absolute; TOP:250px;'><!--广告内容--><iframe id='baiduSpFrame' border='0' vspace='0' hspace='0' marginwidth='0' marginheight='0' framespacing='0' frameborder='0' scrolling='no' width='80' height='80' src='http://spcode.baidu.com/spcode/spstyle/style1241.jsp?tn=longziyong_sp&ctn=0&styleid=1241'></iframe><!--广告内容结束--></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);else percent=Math.floor(percent);document.all.searchspe.style.pixelTop+=percent;lastScrollY=lastScrollY+percent;}window.setInterval("heartBeat0()",1);</script>

运行时产生如下错误:

只有本站会员才能查看附件,请 登录


请高手指点
1 回复
#2
adsdomain2008-05-21 20:00
换个代码吧,网上这样的东西多者呢,不要直接双击这个代码,
1