当前位置: 代码迷 >> Web前端 >> 适用的在线咨询功能
  详细解决方案

适用的在线咨询功能

热度:401   发布时间:2012-08-30 09:55:54.0
实用的在线咨询功能



?查看效果:http:www.miiceic.org.cn/eg/eg2/kefu.html

?

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>安博中程企业培训,企业内训,专注于android培训,软考培训,软件开发,软件工程,嵌入式,UI设计,重构,架构等IT企业培训</title>
<meta name="keywords" content="企业培训,企业内训,android培训,软考培训,it企业培训"/>
<meta name="description" content="安博中程企业培训多年来致力于android培训,软考培训,嵌入式,UI设计,重构,架构,软件测试,需求分析,软件开发,数据库,国防军工等IT高端技术的企业培训、企业内训,一直在行业内处于领先地位,所开企业内训或公开课如软考培训,android应用开发培训,软件工程培训,敏捷开发,嵌入式培训,项目管理及国防军工的电子产品设计和信息化培训等授课讲师均是知名专家,行业内领军人物,已成为中国高端培训第一品牌."/>
<meta name="copyright" content="安博教育集团 中程在线北京科技有限公司版权所有"/>
</head>
<style type="text/css">
.kefu_left{float:left;width:159px;height:277px;overflow:hidden;}
.kefu_right{float:left; width:25px;? margin-top:20px;}
#msg_win{visibility:visible;opacity:1;position:absolute;left:15px; top:100px;display: block;overflow:hidden; z-index:9000; margin:0; padding:0; margin-top:100px;font-family:"宋体"; font-size:12px; color:#000; text-align:left;}
#msg_win .icos{ z-index:9;}
#msg_content{width:159px;height:277px;overflow:hidden; background:url(images/kefubg.gif) no-repeat; display:none;}
#msg_win .ulone{margin-left:-7px;*margin-left:-5px;list-style:none;_padding-left:39px;_padding-top:10px;}
#msg_win .ultwo{ margin-left:-4px; margin-top:10px;list-style:none;_padding-left:39px;}
#msg_win .ultwo p{ margin:0; padding:0; line-height:18px;}
#msg_win .ultwo p span{ font-weight:600; color:#e00000;}
#msg_win .lione{width:115px; height:28px;? line-height:28px; margin-bottom:2px;}
#msg_win .lione a{width:115px;height:28px; display:block; line-height:28px; color:#000;text-decoration:none; padding-left:5px; padding-top:2px;}
#msg_win .lione a:hover{ background-color:#ff9c00; font-weight:600; color:#FFF;}
#msg_win .lione a img{ border:none; margin-right:5px; position:relative; top:4px;}
</style>
<body>
<div id="msg_win">
? <div class="kefu_left">
? <div id="msg_content">
? <ul class="ulone">
? <li class="lione"><a href="http://wpa.qq.com/msgrd?v=3&uin=109907513&site=qq&menu=yes" target="_blank"><img src="images/calltag1.gif" width="16" height="16">QQ在线交谈</a></li>

? <li class="lione"><a href="http://chat.looyu.com/chat/chat/p.do?c=12810&f=64311&n=miiceic" target="_blank"><img src="images/calltag2.gif" width="16" height="16">即时在线交谈</a></li>
? <li class="lione"><a href="http://vip.tq.cn/leavemsg.do?action=leavemsg&admiuin=8435700&uin=8435700&ltype=1&sort=2&lasttalkuin=&rand=8067436827461593&comtimes=3324&iscallback=1&agentid=0&isAgent=0&page=http://www.gec-edu.org/action-page,id-3.html&localurl=http://www.gec-edu.org/&spage=http://www.gec-edu.org/action-page,id-3.html" target="_blank"><img src="images/calltag3.gif" width="16" height="16">免费通话</a></li>
? <li class="lione"><a href="http://chat.looyu.com/chat/chat/p.do?c=12810&f=64311&n=miiceic"><img src="images/calltag4.gif" width="16" height="16">在线留言/报名</a></li>
? <li class="lione"><a href="http://www.miiceic.org.cn/other/74.html"><img src="images/calltag5.gif" width="16" height="16">与中程联系</a></li>
? </ul>
? <ul class="ultwo">
? <p><span>电话:</span>010-82618260</p>

? <p><span>24小时值班手机:</span></p>
? <p>01082618260</p>
? </ul>
? </div>
? </div>
? <div class="kefu_right"><div class="icos"><a id="msg_min" title="最小化" href="javascript:void 0"></a><!--<a id="msg_close" title="关闭" href="javascript:void 0">×</a>--></div></div>
</div>
<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
</body>
</html>
<script language="javascript">
var Message={
set: function() {//最小化与恢复状态切换
var set=this.minbtn.status == 0?[1,0,'none',"<img src='images/back.gif' border='0'>",'恢复',"25px"]:[0,1,'block',"<img src='images/close.gif' border='0'>",'最小化',"190px"];
this.minbtn.status=set[0];
this.win.style.borderBottomWidth=set[1];
this.content.style.display =set[2];
this.minbtn.innerHTML =set[3];
this.minbtn.title = set[4];
this.win.style.width=set[5];
this.win.style.top = this.getY().top;
},

setOpacity: function(x) {//设置透明度
var v = x >= 100 ? '': 'Alpha(opacity=' + x + ')';
this.win.style.visibility = x<=0?'hidden':'visible';//IE有绝对或相对定位内容不随父透明度变化的bug
this.win.style.filter = v;
this.win.style.opacity = x / 100;
},
show: function() {//渐显
clearInterval(this.timer2);
var me = this,fx = this.fx(0, 100, 0.1),t = 0;
this.timer2 = setInterval(function() {
t = fx();
me.setOpacity(t[0]);
if (t[1] == 0) {clearInterval(me.timer2)??? }
},6);//10 to 6
},
fx: function(a, b, c) {//缓冲计算
var cMath = Math[(a - b) > 0 ? "floor": "ceil"],c = c || 0.1;
return function() {return [a += cMath((b - a) * c), a - b]}
},
getY: function() {//计算移动坐标
var d = document,b = document.body,??? e = document.documentElement;
var s = Math.max(b.scrollTop, e.scrollTop);
var h = /BackCompat/i.test(document.compatMode)?b.clientHeight:e.clientHeight;
var h2 = this.win.offsetHeight;
return {middle: s + h + h2 + 2+'px',top: s + h - h2 - 280+'px'}
},
moveTo: function(y) {//移动动画
clearInterval(this.timer);
var me = this,a = parseInt(this.getY().top);
var fx = this.fx(a, parseInt(y));
var t = 0 ;
this.timer = setInterval(function() {
t = fx();
me.win.style.top = t[0]+'px';
if (t[1] == 0) {
clearInterval(me.timer);
me.bind();
}
},6);//10 to 6
},
bind:function (){//绑定窗口滚动条与大小变化事件
var me=this,st,rt;
window.onscroll = function() {
clearTimeout(st);
clearTimeout(me.timer2);
me.setOpacity(0);
st = setTimeout(function() {
me.win.style.top = me.getY().top;
me.show();
},100);//600 mod 100
};
window.onresize = function (){
clearTimeout(rt);
rt = setTimeout(function() {me.win.style.top = me.getY().top},100);
}
},
init: function() {//创建HTML
function $(id) {return document.getElementById(id)};
this.win=$('msg_win');
var set={minbtn: 'msg_min',closebtn: 'msg_close',content: 'msg_content'};
for (var Id in set) {this[Id] = $(set[Id])};
var me = this;
this.minbtn.onclick = function() {me.set();this.blur()};
//this.closebtn.onclick = function() {me.close()};
this.char=navigator.userAgent.toLowerCase().indexOf('firefox')+1?['_','::','×']:['0','2','r'];//FF不支持webdings字体
this.minbtn.innerHTML="<img src='images/close.gif' border='0'>";
this.minbtn.status=0;
//this.closebtn.innerHTML=this.char[2];
setTimeout(function() {//初始化最先位置
me.win.style.display = 'block';
me.content.style.display = 'block';
me.win.style.width = '190px';
me.win.style.top = me.getY().top;
me.moveTo(me.getY().top);
},0);
return this;
}
};
Message.init();

</script>

?

查看效果: http:www.miiceic.org.cn/eg/eg2/kefu.html

  相关解决方案