Skip to main content
We are Brand SEO Beijing serving international business, your marketing partner, Contact us by mi@mgsh.com.cn

The webpage automatically pops up the QQ dialog box

Automatic pop-up dialog

We place a frame in the web page, and then the address of the frame is the code above. When the web page is loaded, it will automatically access this address, so the QQ chat window will pop up automatically. Of course, we need to set this frame not to display, cannot be seen by the user.


Set up multiple customer service QQ

For the situation where there are multiple customer service personnel in the enterprise, the reception is directly and reasonably allocated for the customer service.I have just developed a solution that is to preset multiple customer service QQs, and then randomly pop up a customer service QQ dialog box for the visitor!Of course, this is suitable for enterprises, but not necessary for individual webmasters.

$(function(){
qq_list = new Array('280520115', '2069473421');
//随机
qq_i = Math.floor(Math.random()*qq_list.length);
src = "tencent://message/?uin="+qq_list[qq_i]+"&Site=&menu=yes";
$('.qq_iframe').attr('src', "tencent://message/?uin="+src+"&Site=&menu=yes")
})

Delay popup dialog

Many customers have asked me how to set the popup to pop up after 10 seconds after the visitor opens the page. I researched and updated this popup again, and found a way to set the popup to pop up after 10 seconds!In this way, the user experience can be improved to a certain extent, and at the same time, allowing visitors to look at the high-quality services of the website can effectively improve the customer's recognition of the product, thereby enhancing the opportunity for customers to actively communicate!

$(function(){
setTimeout(function(){
qq_list = new Array('280520115', '2069473421');
//随机
qq_i = Math.floor(Math.random()*qq_list.length);
src = "tencent://message/?uin="+qq_list[qq_i]+"&Site=&menu=yes";
$('.qq_iframe').attr('src', "tencent://message/?uin="+src+"&Site=&menu=yes")
}, 10000)
})

The code shows that there are 2 QQs above. If you need to increase it, add a qq_list. The last 1000 pops up with a delay of 10 seconds!Well, the above are the three methods of setting.
How long is the interval to pop up, not repeatedly pop up:

//根据“键”获取Cookie值
 function getCookie(name){
  var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
  if(arr=document.cookie.match(reg))
   return unescape(arr[2]);
  else
   return null;
 }
 var strCookie = getCookie("data");
 window.onload = function () {
 //获取当前时间
 var newTime = new Date().getTime();
 //
 var time = newTime - strCookie;
 //上次弹出时间与当前时间差大于24小时 弹出登陆QQ
 if(time > 1000 * 60 * 60 * 24){
  //记录当前时间
  var date = new Date().getTime();
  document.cookie="data="+date;
  setTimeout(function () {
   var newE = document.createElement("iframe");
   newE.style.display = 'none';
   newE.src = "tencent://message/?Menu=yes&uin=280520115&Site=piis&Service=300&sigT=45a1e5847943b64c6ff3990f8a9e644d2b31356cb0b4ac6b24663a3c8dd0f8aa12a595b1714f9d45";
   var crea = document.body.appendChild(newE);
   }, 10000);
  }
 }

I don't know why, but it's not very easy to use, so I used the following method:

var qq_chat = true;
function show_qq() {
    if (qq_chat) {
        popwin = window.location.href = 'tencent://message/?uin=280520115&Site=米国生活QQ customer service&Menu=yes' } }; setTimeout("show_qq()", 10000);

Use it first.
 

Back to Top