有段左侧跟随滚动漂浮的浮窗代码,在HTML中可运行,但放入一个ASP的CMS网页中就不显示??
有段左侧跟随滚动漂浮的浮窗代码,在HTML中可运行,但放入一个ASP的CMS网页中就不显示??在织梦的网站上也可以运行,但是在一个科讯的ASP网站上就不能运行。代码如下:...
有段左侧跟随滚动漂浮的浮窗代码,在HTML中可运行,但放入一个ASP的CMS网页中就不显示??在织梦的网站上也可以运行,但是在一个科讯的ASP网站上就不能运行。代码如下:
悬赏100 解决问题继续追加
<body>
<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("ALayer1").style.top=parseInt(document.getElementById("ALayer1").style.top)+percent+"px";
lastScrollY=lastScrollY+percent;
//alert(lastScrollY);
}
suspendcode12="<DIV id=\"ALayer1\" style='left:0px;PosITION:absolute;TOP:100px;FILTER: alpha(opacity=85);'><div align=left></div><img
src='uploadfiles/2222.png' /></div>"
document.write(suspendcode12);
window.setInterval("heartBeat()",1);
function closeBanner()
{
document.getElementById("ALayer1").style.display= 'none';
}
//setTimeout("closeBanner()",6000);
</SCRIPT>
</body>
</html> 展开
悬赏100 解决问题继续追加
<body>
<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("ALayer1").style.top=parseInt(document.getElementById("ALayer1").style.top)+percent+"px";
lastScrollY=lastScrollY+percent;
//alert(lastScrollY);
}
suspendcode12="<DIV id=\"ALayer1\" style='left:0px;PosITION:absolute;TOP:100px;FILTER: alpha(opacity=85);'><div align=left></div><img
src='uploadfiles/2222.png' /></div>"
document.write(suspendcode12);
window.setInterval("heartBeat()",1);
function closeBanner()
{
document.getElementById("ALayer1").style.display= 'none';
}
//setTimeout("closeBanner()",6000);
</SCRIPT>
</body>
</html> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询