dhtmlxAjax是dhtmlxJavaScript项目组一个封装了Ajax的JavaScript包。主要的特性有:
支持GET/POST方法支持异步和同步两种调用方法支持多浏览器可很方便的集成到dhtmlx的其他JavaScript应用AutomaticnewloadercreationsXPathXSLT下面是使用dhtmlxAjax进行Ajax调用的示例:
<script>//functionforprocessingresponsefunctionoutputResponse(loader){if(loader.xmlDoc.responseXML!=null)alert(loader.doSerialization());elsealert("ResponsecontainsnoXML");}//sendasyncGETrequestdhtmlxAjax.get("process.php?param1=value¶m2=value",outputResponse);//sendasyncPOSTrequestdhtmlxAjax.post("process.php","param1=value¶m2=value",outputResponse);//sendsyncGETrequestvarloader=dhtmlxAjax.getSync("process.php?param1=value¶m2=value");//sendsyncPOSTrequestvarloader=dhtmlxAjax.postSync("process.php","param1=value¶m2=value");</script>
评论