以下是我的网站聊天脚本。它总是在我网页的右下角打开。我想在新的单独窗口中打开它。
function chat()
{
window.$zopim||(function(d,s){
var z = $zopim = function(c){
z._.push(c)
},
$ = z.s = d.createElement(s),
e = d.getElementsByTagName(s)[0];
z.set = function(o){
z.set._.push(o)
};
z._ = [];
z.set._ = [];
$.async = !0;
$.setAttribute('charset','utf-8');
$.src = '//v2.zopim.com/?1hwyxUI0W0lLoOIZZgBuVTfGzXIzNhGe';
z.t =+ new Date;
$.type = 'text/javascript';
e.parentNode.insertBefore($,e)
})(document,'script');
}
我是脚本新手,有人可以帮助我吗?
最佳答案
终于我找到了一个完美的人。
<a href="#" onclick="openWin()" >Live Chat Online</a>
<script>
function openWin()
{
var myWindow = window.open("https://v2.zopim.com/widget/popout.html?key=1hwyxUI0W0lLoOIZZgBuVTfGzXIzNhGe","","width=500,height=500");
}
</script>
替换您的密钥= 1hwyxUI0W0lLoOIZZgBuVTfGzXIzNhGe,您可以从此行的zopim生成的代码中获取它
$.src = '//v2.zopim.com/?1hwyxUI0W0lLoOIZZgBuVTfGzXIzNhGe';