本人系新手,不知道readystate是什么东西,编了个网页,总是提醒这个东西没有对象或为空之类的,求高人讲解

解决方案 »

  1.   

    一般这是运用Ajax时才用的一个属性,你最好贴出源码
      

  2.   

    就是一个下拉菜单的地方出了点问题,测试的时候停在
    document.getElementById().style.display="none";
    这儿,不知道是不是用这个是必须要创建个对象什么的???
      

  3.   

    document.getElementById(id) id没有哟
      

  4.   

    readystate 是一种状态,当它等于4的时候是完成状态xmlhttp.open("get",url,true);
        xmlhttp.onreadystatechange = function(){
            if(xmlhttp.readyState == 4)
            {
                if(xmlhttp.status == 200)
                {
                    if(xmlhttp.responseText!=""){
                        document.getElementById("partdiv").innerHTML = unescape(xmlhttp.responseText);        
                    }
                }
                else{
                    document.getElementById("partdiv").innerHTML = "数据载入出错";
                }
            }
        }
        xmlhttp.setRequestHeader("If-Modified-Since","0");
        xmlhttp.send(null);
    }
      

  5.   


    document.getElementById("这里是元素的id").style.display="none";
    readystate 在ajax中经常看到,它是请求的一种状态!