注意,使用了Juqery,请加载。
<script src=libraries/jquery/jquery.min.js></script>
<script >
function popIn(n)
{
var strr = "daqi_pop_url.php?tel=" + n;
window.open(strr);
}
function getext()
{
return "<?php echo $tel;?>";
}
popupStarted = true ;
popcountii = 0;
function popTry(){
popcountii++;
if(popupStarted)
{
ext="";
ext=getext();
str1="daqi_pop_num.php?s=";
str1= str1 + Math.random() + "&ext=" + ext;
$.get( str1 ,function(data){
if(data!=""){
if(popcountii>2)
{
popIn(data);
popcountii=0;
}
}
});
}
window.setTimeout("popTry()",3000);
}
popTry();
</script>