预览加载中,请您耐心等待几秒...
1/6
2/6
3/6
4/6
5/6
6/6

在线预览结束,喜欢就下载吧,查找使用更方便

如果您无法下载资料,请参考说明:

1、部分资料下载需要金币,请确保您的账户上有足够的金币

2、已购买过的文档,再次下载不重复扣费

3、资料包下载后请先用软件解压,在使用对应软件打开

js对联广告代码js对联广告代码导语:经典的对联广告代码,JS代码实现,很简洁,也是通用的.代码,随着滚动条的滚动自动适应,对联大小由CSS控制,这使得代码修改起来更加方便快捷,不懂JS也没有关系,大家可以试着做做看。<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><title>标准对联广告Js代码</title><styletype="text/css"><!--#lovexin12,#lovexin14{width:90px;height:230px;background-color:#ededed;border:1pxsolid#ddd;}html,body{height:1203px;}#mm{height:1000px;}--></style><scriptlanguage="JavaScript"type="text/javascript">lastScrollY=0;functionheartBeat(){vardiffY;if(document.documentElement&&document.documentElement.scrollTop)diffY=document.documentElement.scrollTop;elseif(document.body)diffY=document.body.scrollTopelse{/*Netscapestuff*/}percent=.1*(diffY-lastScrollY);if(percent>0)percent=Math.ceil(percent);elsepercent=Math.floor(percent);document.getElementById("lovexin12").style.top=parseInt(document.getElementById("lovexin12").style.top)+percent+"px";document.getElementById("lovexin14").style.top=parseInt(document.getElementById("lovexin12").style.top)+percent+"px";lastScrollY=lastScrollY+percent;}suspendcode12="<DIVid=\"lovexin12\"style='left:2px;POSITION:absolute;TOP:120px;'>ad1</p>"suspendcode14="<DIVid=\"lovexin14\"style='right:2px;POSITION:absolute;TOP:120px;'>ad2</p>"document.write(suspendcode12);document.write(suspendcode14);window.setInterval("heartBeat()",1);</script></head><body><pid="mm"></p></body></html>