How to implement open Web page automatically popup QQ dialog box

Source: Internet
Author: User

Many business sites open, will pop up a dialog box, and QQ dialog box, not just a Simple Web Page dialog box, through the dialog box can be directly and customer service dialogue, especially the hospital category of the site is more numerous, these sites on the one hand is to retain users, On the one hand also hope that this way to get users QQ number, convenient to do marketing later.

Seriously studied the source code of these sites, found a thing, generally now the site is rarely used framework, because the search engine does not recognize the framework, but these sites have a framework, the address of the framework is a simple address, and is not an HTTP address, such as the following address:

Tencent://message/?uin=1278230143&site=&menu=yes

It's a bit like a phone call link in mobile development, it should be the software that calls your own computer.

Through the automatic pop-up QQ dialog box can achieve a high customer consultation, compared to the "left one, the right one, the middle of another" customer service components, through the "open Web page automatically popup QQ dialog" This way to achieve the increase in the amount of consultation, whether the user experience or effect are much stronger.

Each browser may have a slightly different implementation of this code, Firefox will let you choose what application to open this link, perhaps the user will also tick "Remember my choice of Tencent type link." (R) "so that you won't be able to pop up this dialog box for selecting Applications later.

and IE and other browsers will be directly pop-up dialog box, but if you log in more than one QQ, then he will let you choose a QQ chat.

Put this code, but need the user to click, this is not the effect we need, we want users to open the page when the dialog box pops up, then how to implement?

Auto Popup dialog box

We put a frame in the page, and then the address of the frame is the code above, when the page load will automatically go to the address, so it will automatically pop up QQ Chat window, of course, we need to set this frame does not display, not let users see.

<iframe style= "Display:none;" src= "Tencent://message/?uin=1278230143&site=&menu=yes" ></iframe >
Set up multiple customer service QQ

For the enterprise has a number of customer service situation, in order to customer service directly reasonable distribution of reception. Just also developed a set of solutions is to preset a number of customer service QQ, and then give visitors randomly pop up a customer service QQ dialog Box! Of course this is suitable for the enterprise, for the individual webmaster is not necessary.

<iframe style= "Display:none;" class= "Qq_iframe" src= "" ></iframe><script>$ (function () {qq_list =    New Array (' 1278230143 ', ' 353207542 ');    Random qq_i = Math.floor (Math.random () *qq_list.length);    src = "tencent://message/?uin=" +qq_list[qq_i]+ "&site=&menu=yes"; $ ('. Qq_iframe '). attr (' src ', src);}) </script>
Delay Popup dialog box

A lot of customers asked me how to set a guest to open the page 10 seconds after the pop-up, again research updated this popup, indeed found the method can be set 10 seconds after the popup! This can improve the user experience to a certain extent, at the same time let visitors first look at the site's quality service can effectively enhance customer acceptance of the product, and thus enhance the opportunity for customers to actively communicate!

<iframe style= "Display:none;" class= "Qq_iframe" src= "" ></iframe><script>$ (function () {SetTimeout        (function () {qq_list = new Array (' 1278230143 ', ' 353207542 ');        Random qq_i = Math.floor (Math.random () *qq_list.length);        src = "tencent://message/?uin=" +qq_list[qq_i]+ "&site=&menu=yes";    $ ('. Qq_iframe '). attr (' src ', src); }, 10000)}) </script>

Well, these are the three ways to set up, one that is more than a high-level said, hope to help you.

How to implement open Web page automatically popup QQ dialog box

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.