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 ”¿Ø¼þÀ´¹¹½¨Ò»¸öµ¯³ö¶Ô»°¿ò£¬¿ÉÒÔʵÏÖµ¯³ö¶Ô»°¿ò£¬¶Ô»°¿ò¿ÉÍ϶¯µÈ¹¦ÄÜ¡£±È½ÏÊʺÏ×öÿÈÕÒ»ÌùµÈЧ¹û
Ê×ÏȽâÊÍÏ ......
¾¹ýÕûÀíºÍµ÷ÊÔ£¬Krabber 0.2.9°æ±¾Õýʽ·¢²¼ÁË¡£
Õâ¸ö°æ±¾µÄÌØµãÊDz»½ö½ö¿ÉÒÔÖ´ÐÐAJAXÍøÒ³²¢·µ»ØÖ´ÐкóµÄ½á¹û£¬»¹¿ÉÒÔÓɳéÈ¡Óû§Ìṩ½Å±¾½øÐÐÖ´ÐУ¬²¢·µ»ØÖ´ÐÐÓû§µÄ¶¯×÷½Å±¾ºóµÄ½á¹û¡£ÕâÒ»ÌØÐÔ¿ÉÒԺܺõĽâ¾öÐèÒª½øÐÐAJAX·Ò³¡¢ÑÓʱ¼ÓÔØµÈµÈÎÊÌâ¡£
ÁíÍâÓÉÓÚ¾«Á¦ÓÐÏÞ£¬°æ±¾Ã»Óо¹ýÑϸñµÄ²âÊÔ£¬Òò´ËÓÐÎÊÌâÇëÔÚÕâÀïÁôÑÔ£¬Ð ......
Ò»¡¢¸ÅÊö
¿¼ÂÇHtml±¾Éí²»´ø¶¨Ê±Ë¢ÐÂÒ³ÃæµÄ¿Ø¼þ£¬ÇÒ²»¿¼ÂÇʹÓõÚÈý·½¿Ø¼þ£»Òò´Ë¿¼ÂÇʹÓÃJavascriptÖеÄsetTimeout+xmlhttpÀ´ÊµÏÖ¶¨Ê±¸üÐÂÒ³ÃæÖв¿·ÖÄÚÈÝ£¬´ËʵÏÖÔÚIE6.0¼°ÒÔÉϰ汾²âÊÔͨ¹ý£¬ÆäËûä¯ÀÀÆ÷ÔÝʱδ²âÊÔ¹ý¡£
¶þ¡¢¹¦Äܼ°Ìصã
1¡¢Javascriptͨ¹ýMicrosoftµÄMSXML¶ÔÏ󣬶¯Ì¬»ñÈ¡ºǫ́Êý¾Ý¿âÊý¾Ý£»
&n ......
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 ......
function createXMLHttpRequest(){
if(window.ActiveXObject){
http = new ActiveXObject("Microsoft.XMLHTTP");
}else if(window.XMLHttpRequest){
& ......