大家好,我想实现 一个功能,就是上面哪个图,左边的哪个在线服务QQ怎么才可以随网页的上下而上下 ,
我的代码是这样的,也是从别的网页上拷的,代码我看了几边 ,应该没错,但是就是不能动,郁闷,
不知道那位高手,懂,请教了
<SCRIPT>
var online= new Array();
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</SCRIPT>
<LAYER id=divStayTopLeft left="-2" name="divStayTopLeft">
<TABLE cellSpacing=0 cellPadding=0 width=110 border=0>
<TBODY>
<TR>
<TD width=110><IMG
src="123/kefu_up.gif"
border=0></TD></TR>
<SCRIPT
src="123/getonline.htm"></SCRIPT>
<TR>
<TD vAlign=center
background="123/kefu_middle.gif">
<SCRIPT>
if (online[0]==0)
document.write(" <img src=images/QQoffline.gif border=0 align=middle><a class='qqb' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=270672502&Site=一号通咨询&Menu=no' title='客服不在线,请留言'>270672502</a>");
else
document.write(" <img src=images/QQonline.gif border=0 align=middle><a class='qqa' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=270672502&Site=一号通咨询&Menu=no' title='在线即时交谈'>270672502</a>");
</SCRIPT>
</TD></TR>
<TR>
<TD vAlign=center
background="123/kefu_middle.gif">
<SCRIPT>
if (online[1]==0)
document.write(" <img src=images/QQoffline.gif border=0 align=middle><a class='qqb' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=363812857&Site=一号通咨询&Menu=no' title='客服不在线,请留言'>363812857</a>");
else
document.write(" <img src=images/QQonline.gif border=0 align=middle><a class='qqa' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=363812857&Site=一号通咨询&Menu=no' title='在线即时交谈'>363812857</a>");
</SCRIPT>
</TD></TR>
<TR>
<TD vAlign=center
background="123/kefu_middle.gif">
<SCRIPT>
if (online[2]==0)
document.write(" <img src=images/QQoffline.gif border=0 align=middle><a class='qqb' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=252640645&Site=一号通咨询&Menu=no' title='客服不在线,请留言'>252640645</a>");
else
document.write(" <img src=images/QQonline.gif border=0 align=middle><a class='qqa' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=252640645&Site=一号通咨询&Menu=no' title='在线即时交谈'>252640645</a>");
</SCRIPT>
</TD></TR>
<TR>
<TD vAlign=center
background="123/kefu_middle.gif">
<SCRIPT>
if (online[3]==0)
document.write(" <img src=images/QQoffline.gif border=0 align=middle><a class='qqb' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=562895907&Site=一号通咨询&Menu=no' title='客服不在线,请留言'>562895907</a>");
else
document.write(" <img src=images/QQonline.gif border=0 align=middle><a class='qqa' target=blank
href='http://wpa.qq.com/msgrd?V=1&Uin=562895907&Site=一号通咨询&Menu=no' title='在线即时交谈'>562895907</a>");
</SCRIPT>
</TD></TR>
<TR>
<TD width=110><IMG
src="123/kefu_down.gif"
border=0></TD></TR></TBODY></TABLE></LAYER>
<SCRIPT type=text/javascript>
var verticalpos="frombottom"
if (!document.layers)
document.write('</div>')
function JSFX_FloatTopDiv()
{
var startX =3,
startY = 500;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x;this.style.top=y;};
el.x = startX;
if (verticalpos=="fromtop")
el.y = startY;
else{
el.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
el.y -= startY;
}
return el;
}
window.stayTopLeft=function()
{
if (verticalpos=="fromtop"){
var pY = ns ? pageYOffset : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
}
else{
var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
ftlObj.y += (pY - startY - ftlObj.y)/8;
}
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 10);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopDiv();
</SCRIPT>