此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【zzxap】截止到2008-07-03 16:34:57的历史汇总数据(不包括此帖):
发帖的总数量:66                       发帖的总分数:2350                     
结贴的总数量:59                       结贴的总分数:2107                     
无满意结贴数:7                        无满意结贴分:250                      
未结的帖子数:7                        未结的总分数:243                      
结贴的百分比:89.39 %               结分的百分比:89.66 %                  
无满意结贴率:11.86 %               无满意结分率:11.87 %                  
楼主加油

解决方案 »

  1.   

    你这个传值不是用的POST,用的是GET两种办法,一是将用get方式xmlHttp.open("GET",url,true);
    接收页也全部改成$_GET[]
    第二种办法是用POST方式,其他不变
    试试
    var url ="save.php?"
    xmlHttp.open("POST",url,true);
    xmlHttp.send("id"=id);
      

  2.   

    xmlHttp.open("POST",url,true);
    不知道这个能不能提交过去
      

  3.   

    var url ="save.php?" 
    xmlHttp.open("POST",url,true); 
    xmlHttp.send("id"=id);
    xmlHttp.send("bookname"=bookname);这样一个个send过去吗?我在另外一个页面$id=$_POST['id']不能接收数据吗?
      

  4.   

    xmlHttp.open("POST",url,true);
    不能,你用的是get传值,却用Post方法提交,显然无值要么你就直接用表单提交,不要调用AJAX了,
      

  5.   

    xmlHttp.send("id"=id,"bookname"=bookname,·······);这POST多变量传值我记不清了,你再查查,看是不是上面的
      

  6.   

    function CallServer()
    {
    var id=document.getElementById("id").value;          if (id!="")
              {
    var url ="save.php"; //UTF-8下要用encodeURI
    str = "id=" + "$_POST(id)";
    str += "&bookname=$_POST(bookname)";
    str += "&issuDate=$_POST(issuDate)";
    str += "&price=$_POST(price)";
    str += "&synopsis=$_POST(synopsis)";
    str += "&Maker=$_POST(Maker)";
    str += "&publisher=$_POST(publisher)";
    xmlHttp.open("POST",url,true);
    xmlHttp.onreadystatechange=UpdateData;request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");//post使用时的设定,必须加上。
    request.send( str );          }else
              {
              alert("please write all!");
              }}function UpdateData()
    {
              if(xmlHttp.readyState<4)
              {
              span.innerHTML="loading...";
              }          if(xmlHttp.readyState==4)
              {
              span.innerHTML=xmlHttp.responseText;
              }
       if (request.readyState == 4)
          { // If the request is finished
              if (request.status == 200) // If it was successful
          alert(request.responseText);
                document.getElementById("container").innerHTML = request.responseText; // Display the server's response
          }
    }这样改行不行?
      

  7.   

    其他没什么问题,核心的依然是多变量传值如何构造,我印象中角的是逗号隔开,你再查查xmlHttp.send("id"=id,"bookname"=bookname,·······); id不带引号的是变量
      

  8.   

    str = "id=" + "$_POST(id)";
    str += "&bookname=$_POST(bookname)";
    str += "&issuDate=$_POST(issuDate)";
    str += "&price=$_POST(price)";
    str += "&synopsis=$_POST(synopsis)";
    str += "&Maker=$_POST(Maker)";
    str += "&publisher=$_POST(publisher)";改成以上思路正确,但也不能乱来.你在js代码里用$_POST?
    请用js代码取表单值!看看 http://www.openjs.com/articles/ajax_xmlhttp_using_post.php
    ajax用成熟的js库吧,比如yui,jquery之类的,或者考虑自己封装一下。
      

  9.   

    get方式xmlHttp.open("GET",url,true); 
    接收页也全部改成$_GET[] 
    POST方式,其他不变 
    var url ="save.php?" 
    xmlHttp.open("POST",url,true); 
    xmlHttp.send("id"=id);
      

  10.   

    用 $_REQUEST 而不是 $_POST,$_GET
    这样可以省缺许多麻烦
      

  11.   


    改成这样还是不行啊
    var id=encodeURI(encodeURI(document.getElementById("id").value));
       var bookname=encodeURI(encodeURI(document.getElementById("bookname").value));
       var issuDate=encodeURI(encodeURI(document.getElementById("issuDate").value));   var price=encodeURI(encodeURI(document.getElementById("price").value));
       var synopsis=encodeURI(encodeURI(document.getElementById("synopsis").value));
       var Maker=encodeURI(encodeURI(document.getElementById("Maker").value));
       var publisher=encodeURI(encodeURI(document.getElementById("publisher").value));
       
       var STR="id="+id+"&bookname="+bookname+"&issuDate="+issuDate+"&price="+price+"&synopsis="+synopsis+"&Maker="+Maker+"&publisher="+publisher;
      

  12.   

    ajax要熟悉javascript试试var id=encodeURIComponent(document.getElementById("id").value));
        其他类推
      STR="id="+id+"&bookname="+bookname+"&issuDate="+issuDate+"&price="+price+"&synopsis="+synopsis+"&Maker="+Maker+"&publisher="+publisher;
      

  13.   

    这不是AJAX框架吗??????