First step, JS script
This is more critical, we need to create a new Pop.js script file, we can also add the following code to the site's existing JS file.
The code is as follows |
Copy Code |
var qq_chat = true; function Playjsadpopwin () { if (qq_chat) { Popwin = Window.location.href = ' tencent://message/?uin= our QQ number &site= website name &menu=yes ' } }; SetTimeout ("Playjsadpopwin ()", 1000); |
The corresponding UIn and site parameters can be modified to their own. For the pop-up time, you can adjust the 1000 parameters after settimeout, the larger the number the slower the pop-up.
Step two, add to the page
If the above script in our existing Site page JS, this time can be directly pop-up effect. If we are a new JS file, we need to add pop.js to the page.
The code is as follows |
Copy Code |
<script type= "Text/javascript" src= "Pop.js" ></script> |
And what is the page we open?