如题

解决方案 »

  1.   

    divID.scrollTop = divID.scrollHeight就可以始终最下面了
    加数据方法很多可以,divID.appendChild,等
      

  2.   

    divID.scrollTop = divID.scrollHeight就可以始终最下面了这句话写在那里阿?
      

  3.   

    在你执行一次写入操作以后:
    divID.innerhtml = texd;
    divID.scrollTop = divID.scrollHeight
      

  4.   

    function stateChange()
            {
                var va=document.getElementById("div_chat"); 
                if(xmlhttp.readystate==4 && xmlhttp.status==200)
                {
                    document.getElementById("div_chat").innerText+=xmlhttp.responseText;
                   va.scrollTop=va.scrolHeight;
                }
            }我这样写的可还是不行啊
      

  5.   

    div的style中 overflow设为auto
      

  6.   

    function stateChange()
            {
                var va=document.getElementById("div_chat"); 
                if(xmlhttp.readystate==4 && xmlhttp.status==200)
                {
                    document.getElementById("div_chat").innerText+=xmlhttp.responseText;
                   //va.scrollTop=va.scrolHeight;
                }va.scrollTop=va.scrolHeight;
            }
    和循环无干
      

  7.   

    va.scrollTop=va.scrolHeight;
    ===================
    va.scrollTop=va.scrollHeight;
      

  8.   

    呵呵~  va.scrollTop=va.scrollHeight; 楼主也错了~