IDE ȱÉÙ»ù´¡ÄÜÁ¦¼¯µ÷Óÿ⣬ÕâÊÇÒ»¸ö¼òµ¥µÄAjaxµ÷Óá£
var jsonObj;
var xmlhttp = null;
function callAsync(url, callbackSuccess)
{
xmlhttp = new Ajax();
xmlhttp.open("GET", url, true);
xmlhttp.onreadystatechange=function()
{
// readyState = 4 ; "complete"
if (xmlhttp.readyState==4)
{
// status = 200 ; "ok"
if(xmlhttp.status == 200)
{
uiManager.showNotification(1000, "ok", "Done");
/*
* Remove the substr "jsonFlickrApi(" from the responseText
*/
var text = xmlhttp.responseText;
text = text.substr(14, text.length-15);
// Create JSON Oject
jsonObj = eval('(' + text + ')');
callbackSuccess(jsonObj);
}
else
{
uiManager.showNotification(1000, "warning", "Failed to get data from server");
}
}
}
xmlhttp.send(null);
}
Ïà¹ØÎĵµ£º
±¾ÎĽ«Ê¹ÓÃAjaxToolkitÖеē PopupControlExtender £¬ DynamicPopulateExtender £¬ DragPanelExtender ”¿Ø¼þÀ´¹¹½¨Ò»¸öµ¯³ö¶Ô»°¿ò£¬¿ÉÒÔʵÏÖµ¯³ö¶Ô»°¿ò£¬¶Ô»°¿ò¿ÉÍ϶¯µÈ¹¦ÄÜ¡£±È½ÏÊʺÏ×öÿÈÕÒ»ÌùµÈЧ¹û
Ê×ÏȽâÊÍÏ ......
test.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<html xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta http-equiv=
"Content-Type"
conten ......
½ñÌì°ïͬʽâ¾öÁËjsÒì²½µ÷ÓÃʱ³öÏÖÁËÖÐÎÄÂÒÂëµÄÎÊÌ⣬¾ßÌå½â¾ö°ì·¨ÈçÏ£º
1£©Ê×ÏÈÈ·ÈÏjsÊÇ·ñûÓжԺǫ́´«Êä¹ýÀ´µÄÖÐÎĽøÐнâÂë¡£
°´ÕÕÍøÂçÉÏдµÄ·½·¨Í¨¹ýjs¶ÔresponseµÄ¶ÁÈ¡³öÀ´Êý¾Ý½øÐжà´Î²âÊÔ£¬·¢ÏÖÈÔÈ»²»Äܽâ¾ö£¬Ï¸Ïë²»Ò»¶¨ÊÇ´Ë´¦ÎÊÌâ¡£¸Ä»»ÆäËû°ì·¨½â¾ö¡£
2£©Èç¹û½âÂë½â¾ö²»ÁË£¬ÔÙ¿´ÊÇ·ñÊÇÒòÎªÍø ......
´ÓÖÚ¶à¿Í»§ÆÚÅÎÒѾõÄAjax½çÃæÔÚV4.0.0°æ±¾ÖнҿªÁËÃæÉ´ÒÔÀ´£¬Íز¨Èí¼þÔÚºóÐøµÄÀú´Î°æ±¾¸üÐÂÖж¼ÑÓÓò¢²»¶ÏÍêÉÆAjax½çÃæÕâ¸ö¹¦ÄÜ¡£´ó¼Ò¿ÉÒÔÏÂÔØ²âÊÔ°æ¸ÐÊÜһϣ¬»òÕߵǽTurbomailÍøÂçÔÚÏß°æÌåÑ飺
Web꿅᣼http://mail.turbomail ......
IDE£ºVisual Web Developer 2008 Express Edition
Êý¾Ý¿â£ºAccess 2007
µ½http://www.asp.net/ajax/downloads/ÏÂÔØAJAX Control Toolkit£¬½«AjaxControlToolkit.dll¿½±´µ½ÏîÄ¿µÄbinĿ¼Ï£¬ÔÚ¹¤¾ßÀ¸ÖÐÒýÈë¡£
WebServiceµÄ´úÂ룺£¨aaa.asmx£©
Public Function GetCompletionList(ByVal prefixText As String, ByVal coun ......