window.onload = function(){ var host=document.location.hostname; var url="https://crm.mijingtong.com/js/jquery.min.js"; var script = document.createElement('script'); script.setAttribute('type','text/javascript'); script.setAttribute('src',url); document.getElementsByTagName('head')[0].appendChild(script); var d = new Date(); var url2="https://crm.mijingtong.com/customer_service/kf.js?id="+d.getSeconds(); var script2 = document.createElement('script'); script2.setAttribute('type','text/javascript'); script2.setAttribute('src',url2); var xmlHttp=new XMLHttpRequest();     xmlHttp.open("GET","https://crm.mijingtong.com/customer_service/?host="+host+"&id=20",true);     xmlHttp.send(null);     xmlHttp.onreadystatechange=function () {       if (xmlHttp.readyState ==4 && xmlHttp.status ==200){ //console.log(xmlHttp.responseText); var body=document.getElementsByTagName('body')[0]; var ndiv=document.createElement('div'); ndiv.innerHTML=xmlHttp.responseText; body.appendChild(ndiv); body.appendChild(script2);       }     } } function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i