°×»° Ajax ¼°ÆäÈëÃÅ»ù´¡(2)
ËÄ¡¢³£¼ûAjax±à³Ì¿ò¼Ü
¼ÈÈ»ÉÏÊöAjax¿ò¼ÜÒѾÄܹ¤×÷ÁË£¬ÎªÊ²Ã´»¹ÓÐÄÇô¶àµÄ¿ò¼ÜÄØ£¿
Ëæ×ÅÒ³ÃæµÄ¸´ÔÓ£¬¿ÉÄÜÐèÒªÊéд´óÁ¿µÄJavascript½Å±¾À´¶ÔÒ³ÃæÖеÄDOM¶ÔÏó½øÐпØÖÆ£¬¹¤×÷Á¿ºÍ¸´ÔӶȻá´ó´óÔö¼Ó¡£Ajax±à³Ì¿ò¼Üͨ³£ÀûÓÃÃæÏò¶ÔÏóµÄ·½·¨£¬¶ÔһЩ»ù±¾µÄ¶ÔÏóºÍÐÐΪ¼°Æ临ÔÓÐÔ½øÐÐÁ˺ÏÀíµÄ·â×°£¬½¨ÔìÁËÒ»Ì×ÓÐ×Ô¼ºÌØÉ«µÄÀà¿â£¬²¢ÇÒ¿¼ÂÇÁËЧÂʺͿÉÀ©³äÐÔµÈÓŵ㡣ÎÒÃÇÔÚ¿ª·¢Ê±£¬¿ÉÒÔʹÓýÏÉٵġ¢¸üÇåÎúµÄ´úÂ룬Íê³É×Ô¼ºµÄ¹¤×÷¡£Ò²Ê¹³ÌÐòÔ±Óиü¶àµÄʱ¼äºÍ¾«Á¦¿¼ÂÇÒµÎñÂß¼±¾Éí£¬¶ø²»ÊÇÓëÒ»¶Ñ½Å±¾¾À²øÔÚÒ»Æð¡£
¿ò¼Ü¶¼ÊÇÓëºǫ́½Å±¾Ïà¹ØµÄ¡£Í¨¹ýºǫ́½Å±¾±à³Ì£¬ÎÒÃÇ¿ÉÒÔ²»±ØÊéд´óÁ¿µÄJavascript½Å±¾¾ÍÄܹ¹½¨ä¯ÀÀÆ÷¼æÈݵÄAjaxÓ¦Óá£
±ÈÈ磬ÎÒʹÓÃÒ»¸ö±È½ÏÁ÷ÐеÄPHP xAjax¿ò¼Ü£¬¶ÔÇ°±ßµÄʾÀý³ÌÐò½øÐÐÁ˸Äд£º
<?php
require_once ("../xajax/xajax.inc.php");
//·þÎñÆ÷´¦Àíº¯Êý
function processForm($aFormValues)
{
$objResponse = new xajaxResponse();
$bError = false;
//Çå¿Õ´íÎóÐÅÏ¢
$objResponse->addClear("usernameInfo", "innerHTML");
//ÅжÏÕ˺Å
if (trim($aFormValues['username']) == "")
{
$objResponse->addAppend("usernameInfo", "innerHTML", "Please Input user name.");
$bError = true;
}
else
{
if(trim($aFormValues['username'])=="Thomas")
$objResponse->addAppend("usernameInfo", "innerHTML", "Has been registed");
&n
Ïà¹ØÎĵµ£º
1.´´½¨XMLHttpRequest¶ÔÏó£º
function newXMLHttpRequest() {
var requestObj;
if (window.XMLHttpRequest) {
// Non IE
requestObj = new ActiveObj('XMLHttpRequest');
} else {
//IE
requestObj = new ActiveObj('Microsoft.XMLHTTP');
}
return request ......
ͨ¹ýÀí½â´íÎóµÄ±àÂ뷽ʽ£¬¿ÉÒÔ¸üºÃµØÁ˽âÈçºÎÕýÈ·µØ½øÐбàÂë¡£µ±È»£¬±àд Asynchronous JavaScript™ +
XML£¨Ajax£©ÓÐÕýÈ·µÄ·½·¨£¬Ò²ÓдíÎóµÄ·½·¨¡£±¾ÎĽ«ÌÖÂÛһЩÐèÒª±ÜÃâµÄ³£¼û±àÂëʵ¼ù¡£
Èç¹ûÈËÃÇÔÚµÚÒ»´Î¾ÍÄܹ»½«ËùÓÐÊÂÇéÈ«²¿×ö¶Ô£¬ÄÇôÕâ¸öÊÀ½ç½«±äµÃÍêÈ«²»Í¬¡£Ajax Ò²ÊÇÈç´Ë¡£ÎÒ×öÁË´óÁ¿µÄ¹¤×÷ÒÔÖ§³Ö Ajax
......
Asynchronous JavaScript + XML£¨Ajax£©ÎÞÒÉÊÇ 2006 Äê×îÈÈÃŵļ¼ÊõÊõÓÇÒÓÐÍûÔÚ
2007 µÃµ½½øÒ»²½·¢Õ¹¡£µ«ÊǶÔÄúµÄÓ¦ÓóÌÐòÀ´ËµËü¾¿¾¹ÓÐʲôÒâÒåÄØ£¿Ajax Ó¦ÓóÌÐòÖÐÄÄÒ»ÖÖ³£¼û¼Ü¹¹Ä£Ê½Ó¦ÓÃ×î¹ã·ºÄØ£¿±¾ÎĽ«½éÉÜÎåÖÖ³£¼û
Ajax Éè¼Æģʽ£¬¿ÉÒÔʹÓÃËüÃÇ×÷Ϊ¹¤×÷µÄ»ù´¡¡£
µÄÈ·£¬Ajax
ÊÇ Web 2.0
ÈÈÃÅÊõÓËùÓÐÈ˶¼Ï£Íû ......
Ò»¡¢°×»°AjaxµÄÔÀí
Õâ¸öÆäʵҪ´ÓC/SºÍB/SµÄÔÀí˵Æð¡£Windows²Ù×÷ϵͳµÄµ®Éú£¬Îªµ¥»úͨÐÅÌṩÁ˺ܴóµÄÖ§³Ö£¬³ÌÐòÉè¼ÆÒ²´ÓDOSÔçÆڵĵ¥ÈÎÎñµ¥Óû§ÏòÍøÂçµÄ·Ö²¼Ê½Ó¦Óùý¶È¡£C/SÌṩµÄ¿Í»§/·þÎñÆ÷±à³ÌģʽΪÍøÂçÓ¦ÓÃÌṩÁËÒ»¸öÓÐЧµÄͨÐÅÊֶΡ£ä¯ÀÀÆ÷ÓëWeb·þÎñÆ÷Ö®¼äµÄÇëÇó/ ·þÎñ£¬¾ÍÊ ......