IT源码网

网页上浮动的QQ客服代码

flyfish 2021年04月03日 程序员 351 0
<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&1576821:1576883:1576940:"></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=58560783&Site=www.tenwe.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:58560783: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=58560783&Site=www.tenwe.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:58560783: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=58560783&Site=www.tenwe.com&Menu=yes><img border="0" SRC=http://wpa.qq.com/pa?p=1:58560783: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,
        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>
 
评论关闭
IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!