外贸建站之在线客服JS代码分享
<script> function online_consulting() { var url = 'http://www.chinaobd2.com/chat?name=&email=&locale=en-gb', name = '', iWidth = 520, iHeight = 480, iTop = document.documentElement.clientHeight - iHeight + 30, iLeft = document.documentElement.clientWidth - 530; window.open(url, name, 'height=' + iHeight + ',innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',status=no,toolbar=no,menubar=no,location=no,resizable=no,scrollbars=0,titlebar=no'); } $('.mes-text .close').click(function() { $(this).parent('.mes-text').hide(); $.cookie('customer-service', '1'); }); if ( $.cookie('customer-service') == null ) { $('.customer-service .mes-text').show(); } </script>
代码看上去呢,非常之简单,以上代码是我们用在chinaobd2.com项目上的一段代码,仅供大家参考学习。