如何把漂浮的客服代码加到网页中去
答案:2 悬赏:60 手机版
解决时间 2021-04-23 03:15
- 提问者网友:無理詩人
- 2021-04-22 13:05
如何把漂浮的客服代码加到网页中去
最佳答案
- 五星知识达人网友:野味小生
- 2021-04-22 14:10
1、把图片文件及JS文件上传到相应目录
2、演示页中的客服部分代码粘贴到自己需要加客服的页面中。(如果在头部有包含JS或CS文件也要在自己的网页中加入)
2、演示页中的客服部分代码粘贴到自己需要加客服的页面中。(如果在头部有包含JS或CS文件也要在自己的网页中加入)
全部回答
- 1楼网友:長槍戰八方
- 2021-04-22 15:41
帮你运行了,没有出现java script error description的问题,有可能是你本地环境的问题,至于出现大片空白是因为你的表格标签乱了,没有对应!帮你调一下,代码:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>qq在线客服</title>
<script language=javascript>
function closeqq()
{
divstaytopleft.style.display="none";
return true;
}
function floattop()
{
var startx1 =document.body.offsetwidth-125 ,starty1 = 5;
var startx2 =0,starty2 = 95;
var ns = (navigator.appname.indexof("netscape") != -1);
var d = document;
function ml(id,startx,starty)
{
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;
el.y = starty;
return el;
}
window.staytopleft=function()
{
var py = ns ? pageyoffset : document.body.scrolltop;
ftlobj.y += (py + starty1 - ftlobj.y)/8;
ftlobj1.y += (py + starty2 - ftlobj1.y)/8;
ftlobj.sp(document.body.scrollleft+document.body.offsetwidth-125, ftlobj.y);
ftlobj1.sp(ftlobj1.x, ftlobj1.y);
settimeout("staytopleft()", 30);
}
ftlobj = ml("divstay",(document.body.scrollleft+document.body.offsetwidth)/2+505,0);
ftlobj1 = ml("divstaytopleft",(document.body.scrollleft+document.body.offsetwidth)/2+509,30);
staytopleft();
}
</script>
</head>
<body>
<div id=divstay style="position:absolute"></div>
</div>
<script language=javascript>
function picsize(obj,maxwidth){
img=new image();
img.src=obj.src;
if (img.width>maxwidth)
{
return maxwidth;
}
else
{
return img.width;
}
}
function closeqq()
{
divstaytopleft.style.display="none";
return true;
}
var online= new array();
</script>
<div id="divstaytopleft" style="position: absolute; left: 267px; top: 34px;">
<table cellspacing="0" cellpadding="0" width="109" border="0">
<tr>
<td colspan="3">
<a onclick="closeqq()" href="javascript:;" shape="circle" coords="91,16,12">
<img height="34" src="qq3.png" width="109" usemap="#map" border="0"></a></td>
</tr>
<tr>
<td width="6"><img height="250" src="qq2.png" width="6"></td>
<td valign="top" width="96" background="sto/qq_bg.gif">
</td></tr></table>
</div>
中间省略。。。。。。。。。
floattop();
<!--end -->
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="800"> </td>
</tr>
</table>
<script type="text/javascript">floattop();</script>
</body>
</html>
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯