Xajax倒是不错,是用PHP做的,不过只是实现了最基本的ajax理念,没有界面方面的东东

解决方案 »

  1.   

    如果要让php生成,那就是xajax,如果你自己写js,还可以用jquery或者ext什么的
      

  2.   

    有没有这方面的案例,前些天我试着用 xmlhttprequest 实现,但是实现不了.现在我想知道 如果用xmlhttprequest post方法传到一个*.php页异步传输.那么php页用什么接受传过来的值,$_POST[]?$_GET[]?$_REQUEST[]?
      

  3.   

    print_r($_POST);就像你提交表单一样
      

  4.   

    那么用JavaScript 的xmlhttprequest对象能不能提交给*.php文件呢? 我创建的时候的代码                   try
    {
    xmlhttp=new XMLHttpRequest();
    }catch(e){
    xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
    }                xmlhttp.open("post","reg.php",true);
    xmlhttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
    alert("title="+title+"&author="+author+"&content="+content);
    xmlhttp.send("title="+title+"&author="+author+"&content="+content);
    然后用浏览器 腾讯TT的.
      

  5.   

    而且测试出来xmlhttp那么变量是undefined
      

  6.   

    undefined 就是 xmlhttp 根本没有初始化成功 if(typeof XMLHttpRequest != 'undefined') {
    xmlhttp = new XMLHttpRequest();
    }else {
    var aVersion = new Array(
    'MSXML2.XMLHTTP.6.0',
    'MSXML2.XMLHTTP.5.0',
    'MSXML2.XMLHTTP.4.0',
    'MSXML2.XMLHTTP.3.0',
    'MSXML2.XMLHTTP.2.0',
    'MSXML2.XMLHTTP',
    'Microsoft.XMLHTTP'
    );
    var length = aVersion.length;
    for(var i = 0; i < length; i++) {
    try {
    xmlhttp = new ActiveXObject(aVersion[i]);
    break;
    }catch(exception) {
    }
    }
    } if(!xmlhttp) {
    alert('Can\'t create XMLHttpRequest.');
    return false;
    }
      

  7.   

    http://www.rsywx.net/jquery/demos是关于jQuery的示例;
    http://www.rsywx.net/xajax/demos是关于xajax的示例。两边例子基本类似,你可以自己比较一下你喜欢哪种实现方法。
      

  8.   

    不错..谢谢共享...数据库都密码帐号都给出来了...嘿嘿..@#$%^&