使用setTimeout(xxx,times) +ajaxajax:<script language="javascript" type="text/javascript">
function aa(i)
{
  document.form1.xxzz.value=i;
}
function checkregusername()
  {   var xmlhttp;
   try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
    catch (e)
   {
    try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
     catch (e)
     {
   try{xmlhttp=new XMLHttpRequest();}
   catch(e)
   {
    var cs=document.getElementById("erroruname");
    cs.innerHTML="<font color='#ff0000'>ddd</font>";
    }
   }
    }   xmlhttp.open("get","2.aspx?n="+Math.random(),true);
   xmlhttp.onreadystatechange=function()
   {
     if(xmlhttp.readyState==4)
  {
    if(xmlhttp.status==200)
    {
      if (xmlhttp.responseText=="xxxxx")
      { 
     msg="0000!";
      }
   else
   {
    msg=xmlhttp.responseText;
   }  
    }
    else
    {
      msg="正在载入数据.......";
    }
    var cs=document.getElementById("erroruname");
    cs.innerHTML=msg; 
    diaoyong()//回调函数--------------------------////////////////////////////////////
  }
  else
  {
    
  }
   }
   xmlhttp.send(null);  
   return false;
 }
 </script><body>
<div id="erroruname"><div>
//////============================================================
<script>
function huidiao()
{
   setTimeout("checkregusername()",60000)
}
setTimeout("checkregusername()",60000)
</script>
//////=================================================================
</body>每格1分钟象2.aspx提交一次数据      ok欢迎大家指正   我的个人网站  http://www.iyedu.cn