把下面的代码粘贴到网页的body范围内就可以了。
示范网址: http://www.lhsoft.com.cn/index.jsp
<!-- ********QQ在线咨询代码(浮动)开始******** -->
<script>
var online= new Array();
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>
<layer name="divStayTopLeft" left="880" top="1055" id="divStayTopLeft">
<table width="110" border="1">
<tr>
<td width="100" background="../images/title.JPG">QQ Online </td>
</tr>
<tr>
<td><img src="../images/online.JPG" width="100" height="35"></td>
</tr>
<tr>
<td height="207" bgcolor="#7BA2EF"><table width="93" border="0" align="center" bgcolor="#E7F3FF">
<tr>
<td width="126" align="center">销售咨询</td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=37804333&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:37804333:6 alt="我是37804333,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=807995337&Site=lhsoft.com.cn&Menu=no><img border="0" src=http://wpa.qq.com/pa?p=1:807995337:6 alt="我是807995337,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=msnim:chat?contact=huangminghui2003@hotmail.com><img border="0" src="../images/msn.gif" alt="我是huangminghui2003@hotmail.com,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center">技术咨询</td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=19598123&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:19598123:6 alt="我是19598123,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=247695564&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:247695564:6 alt="我是247695564,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=msnim:chat?contact=szliszt@hotmail.com><img border="0" src="../images/msn.gif" alt="我是szliszt@hotmail.com,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center">远程客服</td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=373285520&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:373285520:6 alt="我是373285520,请问我有什么可以帮到您呢?"></a></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="30" background="../images/title.JPG">点击客户QQ号码及时交流或留言</td>
</tr>
</table>
</layer>
<script type="text/javascript">
//Enter "frombottom" or "fromtop"
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>
<!-- ********浮动的QQ在线咨询代码结束******** -->
示范网址: http://www.lhsoft.com.cn/index.jsp
<!-- ********QQ在线咨询代码(浮动)开始******** -->
<script>
var online= new Array();
if (!document.layers)
document.write('<div id="divStayTopLeft" style="position:absolute">')
</script>
<layer name="divStayTopLeft" left="880" top="1055" id="divStayTopLeft">
<table width="110" border="1">
<tr>
<td width="100" background="../images/title.JPG">QQ Online </td>
</tr>
<tr>
<td><img src="../images/online.JPG" width="100" height="35"></td>
</tr>
<tr>
<td height="207" bgcolor="#7BA2EF"><table width="93" border="0" align="center" bgcolor="#E7F3FF">
<tr>
<td width="126" align="center">销售咨询</td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=37804333&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:37804333:6 alt="我是37804333,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=807995337&Site=lhsoft.com.cn&Menu=no><img border="0" src=http://wpa.qq.com/pa?p=1:807995337:6 alt="我是807995337,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=msnim:chat?contact=huangminghui2003@hotmail.com><img border="0" src="../images/msn.gif" alt="我是huangminghui2003@hotmail.com,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center">技术咨询</td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=19598123&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:19598123:6 alt="我是19598123,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=247695564&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:247695564:6 alt="我是247695564,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center"><a target=blank href=msnim:chat?contact=szliszt@hotmail.com><img border="0" src="../images/msn.gif" alt="我是szliszt@hotmail.com,请问我有什么可以帮到您呢?"></a></td>
</tr>
<tr>
<td align="center">远程客服</td>
</tr>
<tr>
<td align="center"><a target=blank href=tencent://message/?uin=373285520&Site=lhsoft.com.cn&Menu=yes><img border="0" src=http://wpa.qq.com/pa?p=1:373285520:6 alt="我是373285520,请问我有什么可以帮到您呢?"></a></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="30" background="../images/title.JPG">点击客户QQ号码及时交流或留言</td>
</tr>
</table>
</layer>
<script type="text/javascript">
//Enter "frombottom" or "fromtop"
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>
<!-- ********浮动的QQ在线咨询代码结束******** -->