两侧浮动图片,如何使它保持在网页上哪?高手救救俺好吗

来源:百度知道 编辑:UC知道 时间:2024/05/31 10:17:27
我用的一个两侧图片可以浮动的代码,但显示5分钟左右就消失了,如何让他一直在网页上哪??以下是代码,
<script language="JavaScript" type="text/javascript">
lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else
{/*Netscape stuff*/}

//alert(diffY);
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("lovexin12").style.top=parseInt(document.getElementById

("lovexin12").style.top)+percent+"px";

document.getElementById("lovexin13").style.top=parseInt(document.getElementById

("lovexin13").style.top)+percent+"px";

document.getElementById("lovexin14").style.top=pars

左栏浮动广告
<script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: <script language=javascript>var specialcode="<DIV id=searchspe style='Z-INDEX: 100; right: 1px; POSITION: absolute; TOP: 180px;'><TABLE cellSpacing=0 cellPadding=0 width=150 style='border-left:1px solid #2E6287;border-top:1px solid #2E6287;border-right:1px solid #2E6287;font-size:12px;color:#ffffff; border-bottom-color:#2E6287; border-bottom-width:1px'><TR bgcolor=#2E6287><TD height=20> 推荐↓</TD><TD style='CURSOR: hand' onclick=searchspe.style.visibility='hidden' width=30>关 闭</TD></TR></TABLE><table border='1' width='150' height='500' bordercolor='#2E6287'><tr><td>广告内容</td></tr></table></DIV>";document.write(specialcode);lastScrollY=0;function heartBeat0(){diffY=document.body.scrollTop;percent=.1*(diffY