• λ我爱Aspx >> C#.Net >> 5个QQ群里没人解决的Ajax小问题:<ajax基础教程>上的一段代码,请指教~~!
  • 5个QQ群里没人解决的Ajax小问题:<ajax基础教程>上的一段代码,请指教~~!

  • :aspxer  Դ:csdn  :2007-6-12 3:44:46  ؼ:ajax
  • HTML文件里的JS:

    <script type="text/javascript">

    var xmlHttp;

    var requestType;

    function createHttpRequest()

    {

    if(window.ActiveXObject)

    {

    xmlHttp=new window.ActiveXObject("Microsoft.XMLHTTP");

    }

    else if(window.XMLHttpRequest)

    {

    xmlHttp=new XMLHttpRequest();

    }

    }

    function startRequest(requestList)

    {

    requestType=requestList;

    createHttpRequest();

    xmlHttp.onreadystatechange=handleStateChange;

    xmlHttp.open("GET","parseXML.xml",true);

    xmlHttp.send(null);

    }

    function handleStateChange()

    {

    if(xmlHttp.readystate==4)

    {

    //本机返回成功时的xmlHttp.status值也为0,所以下一句判断status是否为0

    if(xmlHttp.status==200||xmlHttp.status==0)

    {

    alert(xmlHttp.responseText);

    if(requestType=="north")

    {

    ListNorthStates();

    Ҷƪл˵?
  • һƪmakefile入门问题
    һƪ做一个j2ee的网站,但是论坛用php来写,怎么样才能链接得好啊?