|
楼主 |
发表于 2011-8-28 16:09:59
|
显示全部楼层
来自 中国–山东–济南
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>浮动条</title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<script>
var online= new Array();
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>
<layer id="divStayTopLeft">
<table border="0" width="110" cellspacing="0" cellpadding="0">
<tr>
<td width="110"><img border=0 src=http://imis.qq.com/images/wpa/images/kefu_up.gif></td>
</tr>
<script src="http://webpresence.qq.com/getonline?Type=1&552429884:272356897:"></script>
<tr>
<td align="center" valign=middle background=http://imis.qq.com/images/wpa/images/kefu_middle.gif>
<a target=blank href=tencent://message/?uin=552429884&Site=www.jnsjpt.com&Menu=yes><img border="0" SRC=http://wpa.QQ.com/pa?p=1:552429884:6 alt="点击这里与高经理在线交流"></a>
</td>
</tr>
<tr>
<td align="center" valign=middle background=http://imis.qq.com/images/wpa/images/kefu_middle.gif>
<a target=blank href=tencent://message/?uin=272356897&Site=www.jnsjpt.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:272356897:6 alt="点击这里与吴经理在线交流"></a>
</td>
</tr>
<tr>
<td width="110"><img border=0 src=http://imis.qq.com/images/wpa/images/kefu_down.gif></td>
</tr>
</table>
</layer>
<p>
<script type="text/javascript">
var verticalpos="frombottom"
if (!document.layers)
document.write('</div>')
function JSFX_FloatTopDiv()
{
下面的var startX =3是水平位置,350是垂直位置;默认情况在屏幕左侧显示,若要改为右侧显示,修改3的值(var startX =3改为var startX =screen.width-150)即可(这行不用复制)
var startX =screen.width-150,
startY = 350;
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.right=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>
</body> 这是我的代码 在后台怎么操作
</html> |
|