求一个兼容ff的qq客服漂浮代码 如题。网上找了很多,没有一个兼容ff的,汗~~~不兼容的就不用告诉我了...我头都大了。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 自己找到了,分享下:<script language="javascript" src="qq.js"></script>qq.js如下:document.writeln("<div id=\"kfFloat\" style=\"margin:0; padding:0; z-index: 20; visibility: visible; position: absolute; top: 150px; right:9px;\">");document.writeln("<table id=\"qqtab\" cellspacing=\"0\" cellpadding=\"0\" width=\"110\" border=\"0\">");document.writeln(" <tbody>");/*document.writeln(" <tr>");document.writeln(" <td valign=\"bottom\" width=\"110\" onclick=\"if(document.getElementById('qqtab').style.display==\'none\'){document.getElementById('qqtab').style.display=\'\'} else {document.getElementById('qqtab').style.display=\'none\'}\">点击关闭<\/td>");document.writeln(" <\/tr>");*/document.writeln(" <tr id=\"qqstab\">");document.writeln(" <td valign=\"middle\" align=\"center\"style=\"background:url(\/images\/qq\/skin\/0\/mid.gif) repeat-y\">");document.writeln(" <table cellspacing=\"0\" cellpadding=\"0\" width=\"89\" border=\"0\">");document.writeln(" <tbody>");document.writeln(" <tr>");document.writeln(" <td valign=\"middle\" align=\"center\" width=\"89\" height=\"26\"><nobr><a title=\"购买产品请咨询我!\" target=\"_blank\" href=\"http:\/\/webchat.tq.cn\/sendmain.jsp?uin=790675603\"><font style=\"font-size: 12px; color: #00f\">在线销售<\/font> <\/a><\/nobr><\/td>");document.writeln(" <\/tr>");document.writeln(" <tr>");document.writeln(" <td valign=\"middle\" align=\"left\" width=\"89\" height=\"26\"><nobr><a href=\"tencent:\/\/message\/?Uin=790675603&Site=德斯兰机电&Menu=yes\"> 790675603<img alt=\"在线销售\" border=\"0\" src=\"http:\/\/wpa.qq.com\/pa?p=1:790675603:10\" \/> <\/a><\/nobr><\/td>");document.writeln(" <\/tr>");document.writeln(" <tr>");document.writeln(" <td valign=\"middle\" align=\"center\" width=\"89\" height=\"26\"><nobr><a title=\"售后服务请咨询我!\" target=\"_blank\" href=\"http:\/\/webchat.tq.cn\/sendmain.jsp?uin=854370776\"><font style=\"font-size: 12px; color: #00f\">售后服务<\/font> <\/a><\/nobr><\/td>");document.writeln(" <\/tr>");document.writeln(" <tr>");document.writeln(" <td valign=\"middle\" align=\"left\" width=\"89\" height=\"26\"><nobr><a href=\"tencent:\/\/message\/?Uin=854370776&Site=德斯兰机电&Menu=yes\"> <font style=\"font-size: 12px; color: #00f\">854370776<\/font> <img alt=\"在线销售\" border=\"0\" src=\"http:\/\/wpa.qq.com\/pa?p=1:854370776:10\" \/> <\/a><\/nobr><\/td>");document.writeln(" <\/tr>");document.writeln(" <\/tbody>");document.writeln(" <\/table>");document.writeln(" <\/td>");document.writeln(" <\/tr>");/*document.writeln(" <tr>");document.writeln(" <td valign=\"top\" width=\"110\" onClick=\"if(document.getElementById('qqstab').style.display==\'none\'){document.getElementById('qqstab').style.display=\'block\'} else {document.getElementById('qqstab').style.display=\'none\'}\">点击收起<\/td>");document.writeln(" <\/tr>");*/document.writeln(" <\/tbody>");document.writeln("<\/table>");document.writeln("<\/div>");//js 部分document.writeln("<script type=\"text\/javascript\">");document.writeln("\/\/<![CDATA[");document.writeln("var tips; var theTop = 120; var old = theTop;");document.writeln("function initFloatTips() {");document.writeln("tips = document.getElementById(\'kfFloat\');");document.writeln("moveTips();");document.writeln("};");document.writeln("function moveTips() {");document.writeln("var grantt=20;");document.writeln("if (window.innerHeight) {");document.writeln(" pos = window.pageYOffset");document.writeln("}");document.writeln("else if (document.documentElement && document.documentElement.scrollTop) {");document.writeln(" pos = document.documentElement.scrollTop");document.writeln("}");document.writeln("else if (document.body) {");document.writeln(" pos = document.body.scrollTop;");document.writeln("}");document.writeln("pos=pos-tips.offsetTop+theTop;");document.writeln("pos=tips.offsetTop+pos\/10;");document.writeln("if (pos < theTop) pos = theTop;");document.writeln("if (pos != old) {");document.writeln(" tips.style.top = pos+\"px\";");document.writeln(" grantt=10;");document.writeln(" \/\/alert(tips.style.top);");document.writeln("}");document.writeln("old = pos;");document.writeln("setTimeout(moveTips,grantt);");document.writeln("}");document.writeln("\/\/!]]>");document.writeln("initFloatTips();");document.writeln("<\/script>"); <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <base href="<%=basePath%>"> <title>My JSP 'QQ.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!-- <link rel="stylesheet" type="text/css" href="styles.css"> --><script>var online= new Array();</script> </head> <body> <div id="QQ" style="width:115;height:170;"><table border="0px" cellspacing="0" cellpadding="0"><tr><td width="110"><img border="0" src="/OCTMami/images/top.gif" /></td></tr><tr><td> <script> if (online[0]==0) document.write("<div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222938_QQoffline.gif border=0 align=middle><a class='qqb' target=blank href='tencent://message/?uin=453510435&Site=QQ客服&Menu=yes' title='客服不在线,请留言'>453510435</a></div>"); else document.write(" <div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222952_QQonline.gif border=0 align=middle><a class='qqa' target=blank href='tencent://message/?uin=453510435&Site=QQ客服&Menu=yes' title='在线即时交谈'>453510435</a></div>"); if (online[1]==0) document.write("<div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222938_QQoffline.gif border=0 align=middle><a class='qqb' target=blank href='tencent://message/?uin=378566744&Site=QQ客服&Menu=yes' title='客服不在线,请留言'>378566744</a></div>"); else document.write(" <div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222952_QQonline.gif border=0 align=middle><a class='qqa' target=blank href='tencent://message/?uin=378566744&Site=QQ客服&Menu=yes' title='在线即时交谈'>378566744</a></div>");</script > </td></tr><tr><td width="110px"><img border="0" src="/OCTMami/images/bottom.gif"/></td></tr></table><script>/** 漂浮 **/(function(){ this.get_ = function(){return document.getElementById(arguments[0]);}; var qq = this.get_("QQ"); //var width_ = (document.documentElement.clientWidth - qq.offsetWidth) / 2; var height_ = (document.documentElement.clientHeight - qq.offsetHeight) / 2; //alert(document.body.clientWidth); with(qq.style){ position="absolute"; if(!document.all){ position="fixed"; } zIndex="2"; top=height_+"px"; left="0px"; } if(document.all){ window.onscroll = function(){ qq.style.top = height_ + document.documentElement.scrollTop } }})();</script></div> </body></html>//超级兼容, 显示出来可能没有图片。 和我的情况类似 http://topic.csdn.net/u/20100609/13/122e6aff-da05-4916-8c29-e3a66ef41ed4.html?81633 怎么自定义JqueryUIdialog的样式,去掉标题栏和背景 求JS入门视频 急急急 关于javascript外部链接 有一个数组 如果打乱里面的排序顺序啊 ext的grid中可以放tree控件吗?? 如何获得汉字的发音 如何清除除了<p>和</p>标记以外的其它标,正则表达式,求解, 如何在内容页面提交一个数据后的时候,同时把左侧的导航 给它刷新一下?? 360浏览器网址自动提交两次问题 手动不能关闭embed背景音乐?? javascript 悬浮菜单 javascript 小小单词游戏
<script language="javascript" src="qq.js"></script>qq.js如下:document.writeln("<div id=\"kfFloat\" style=\"margin:0; padding:0; z-index: 20; visibility: visible; position: absolute; top: 150px; right:9px;\">");
document.writeln("<table id=\"qqtab\" cellspacing=\"0\" cellpadding=\"0\" width=\"110\" border=\"0\">");
document.writeln(" <tbody>");
/*document.writeln(" <tr>");
document.writeln(" <td valign=\"bottom\" width=\"110\" onclick=\"if(document.getElementById('qqtab').style.display==\'none\'){document.getElementById('qqtab').style.display=\'\'} else {document.getElementById('qqtab').style.display=\'none\'}\">点击关闭<\/td>");
document.writeln(" <\/tr>");*/
document.writeln(" <tr id=\"qqstab\">");
document.writeln(" <td valign=\"middle\" align=\"center\"style=\"background:url(\/images\/qq\/skin\/0\/mid.gif) repeat-y\">");
document.writeln(" <table cellspacing=\"0\" cellpadding=\"0\" width=\"89\" border=\"0\">");
document.writeln(" <tbody>");document.writeln(" <tr>");
document.writeln(" <td valign=\"middle\" align=\"center\" width=\"89\" height=\"26\"><nobr><a title=\"购买产品请咨询我!\" target=\"_blank\" href=\"http:\/\/webchat.tq.cn\/sendmain.jsp?uin=790675603\"><font style=\"font-size: 12px; color: #00f\">在线销售<\/font> <\/a><\/nobr><\/td>");
document.writeln(" <\/tr>");
document.writeln(" <tr>");
document.writeln(" <td valign=\"middle\" align=\"left\" width=\"89\" height=\"26\"><nobr><a href=\"tencent:\/\/message\/?Uin=790675603&Site=德斯兰机电&Menu=yes\"> 790675603<img alt=\"在线销售\" border=\"0\" src=\"http:\/\/wpa.qq.com\/pa?p=1:790675603:10\" \/> <\/a><\/nobr><\/td>");
document.writeln(" <\/tr>");
document.writeln(" <tr>");
document.writeln(" <td valign=\"middle\" align=\"center\" width=\"89\" height=\"26\"><nobr><a title=\"售后服务请咨询我!\" target=\"_blank\" href=\"http:\/\/webchat.tq.cn\/sendmain.jsp?uin=854370776\"><font style=\"font-size: 12px; color: #00f\">售后服务<\/font> <\/a><\/nobr><\/td>");
document.writeln(" <\/tr>");document.writeln(" <tr>");
document.writeln(" <td valign=\"middle\" align=\"left\" width=\"89\" height=\"26\"><nobr><a href=\"tencent:\/\/message\/?Uin=854370776&Site=德斯兰机电&Menu=yes\"> <font style=\"font-size: 12px; color: #00f\">854370776<\/font> <img alt=\"在线销售\" border=\"0\" src=\"http:\/\/wpa.qq.com\/pa?p=1:854370776:10\" \/> <\/a><\/nobr><\/td>");
document.writeln(" <\/tr>");
document.writeln(" <\/tbody>");
document.writeln(" <\/table>");document.writeln(" <\/td>");
document.writeln(" <\/tr>");
/*document.writeln(" <tr>");
document.writeln(" <td valign=\"top\" width=\"110\" onClick=\"if(document.getElementById('qqstab').style.display==\'none\'){document.getElementById('qqstab').style.display=\'block\'} else {document.getElementById('qqstab').style.display=\'none\'}\">点击收起<\/td>");
document.writeln(" <\/tr>");*/
document.writeln(" <\/tbody>");
document.writeln("<\/table>");
document.writeln("<\/div>");//js 部分
document.writeln("<script type=\"text\/javascript\">");
document.writeln("\/\/<![CDATA[");
document.writeln("var tips; var theTop = 120; var old = theTop;");
document.writeln("function initFloatTips() {");
document.writeln("tips = document.getElementById(\'kfFloat\');");
document.writeln("moveTips();");
document.writeln("};");
document.writeln("function moveTips() {");
document.writeln("var grantt=20;");
document.writeln("if (window.innerHeight) {");
document.writeln(" pos = window.pageYOffset");
document.writeln("}");
document.writeln("else if (document.documentElement && document.documentElement.scrollTop) {");
document.writeln(" pos = document.documentElement.scrollTop");
document.writeln("}");
document.writeln("else if (document.body) {");
document.writeln(" pos = document.body.scrollTop;");
document.writeln("}");
document.writeln("pos=pos-tips.offsetTop+theTop;");
document.writeln("pos=tips.offsetTop+pos\/10;");document.writeln("if (pos < theTop) pos = theTop;");
document.writeln("if (pos != old) {");
document.writeln(" tips.style.top = pos+\"px\";");
document.writeln(" grantt=10;");
document.writeln(" \/\/alert(tips.style.top);");
document.writeln("}");document.writeln("old = pos;");
document.writeln("setTimeout(moveTips,grantt);");
document.writeln("}");
document.writeln("\/\/!]]>");
document.writeln("initFloatTips();");
document.writeln("<\/script>");
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'QQ.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<script>
var online= new Array();
</script>
</head>
<body>
<div id="QQ" style="width:115;height:170;">
<table border="0px" cellspacing="0" cellpadding="0">
<tr><td width="110"><img border="0" src="/OCTMami/images/top.gif" /></td></tr>
<tr><td>
<script>
if (online[0]==0)
document.write("<div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222938_QQoffline.gif border=0 align=middle><a class='qqb' target=blank href='tencent://message/?uin=453510435&Site=QQ客服&Menu=yes' title='客服不在线,请留言'>453510435</a></div>");
else
document.write(" <div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222952_QQonline.gif border=0 align=middle><a class='qqa' target=blank href='tencent://message/?uin=453510435&Site=QQ客服&Menu=yes' title='在线即时交谈'>453510435</a></div>");
if (online[1]==0)
document.write("<div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222938_QQoffline.gif border=0 align=middle><a class='qqb' target=blank href='tencent://message/?uin=378566744&Site=QQ客服&Menu=yes' title='客服不在线,请留言'>378566744</a></div>");
else
document.write(" <div style='background:url(/OCTMami/images/middle.gif);padding-left:0px'><img src=/OCTMami/images/20050408222952_QQonline.gif border=0 align=middle><a class='qqa' target=blank href='tencent://message/?uin=378566744&Site=QQ客服&Menu=yes' title='在线即时交谈'>378566744</a></div>");
</script >
</td></tr>
<tr><td width="110px">
<img border="0" src="/OCTMami/images/bottom.gif"/>
</td></tr>
</table><script>
/** 漂浮 **/
(function(){
this.get_ = function(){return document.getElementById(arguments[0]);};
var qq = this.get_("QQ"); //var width_ = (document.documentElement.clientWidth - qq.offsetWidth) / 2;
var height_ = (document.documentElement.clientHeight - qq.offsetHeight) / 2; //alert(document.body.clientWidth);
with(qq.style){
position="absolute";
if(!document.all){
position="fixed";
}
zIndex="2";
top=height_+"px";
left="0px";
}
if(document.all){
window.onscroll = function(){
qq.style.top = height_ + document.documentElement.scrollTop
}
}
})();
</script>
</div>
</body>
</html>
//超级兼容, 显示出来可能没有图片。