ajax.jsfunction funadd() 

  
  S_xmlhttprequest(); 
  var url = "for.php";
  var f = document.myform;
  var u_id = f.uid.value;
  var u_Content = f.replyContent.value;
  var postStr = "uid="+u_id+"&u_Content="+u_Content;
  xmlHttp.onreadystatechange = handleStateChange;
  xmlHttp.open("POST", url, true);
  xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  xmlHttp.send(postStr);
 
} function handleStateChange()

   
  if(xmlHttp.readyState == 4 )
   { 
     if(xmlHttp.status == 200||xmlHttp.status == 0) 
       { 
         
         document.getElementById('main').innerHTML = xmlHttp.responseText+ document.getElementById("main").innerHTML;
       } 
   } 
} for.php <?php
 
       $u_id=$_POST['uid'];
       $u_Content=$_POST['u_Content'];
       require_once('func.php');
       $mysqli=new my_db();
       $row=$mysqli->modify("UPDATE tb_reply SET manage_text = '$u_Content',manage_time = NOW( ) WHERE id ='$u_id'"); ?>不断的插入数据,比如10条的话,有可能1条或2条数据插入失败 大家看看是不是代码那里有不完善的地方 谢谢!