亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

AJAX ??

AJAX? ?? ???? ?? ???? ??? ????? ??? ????? ? ?? ?????.


AJAX? A??? JjavaScript And XML? ??.

AJAX? ??? ????? ??? ??? ??? ? ???? ??? ???? ? ??????? ?? ? ?? ??? ?????.

AJAX? JavaScript? ???? ? ????? ? ?? ?? ???? ??????.

AJAX? ???? ??????? ??? ??? ???? ???? ????? ?????? ????? ? ????. ?? ?? ???? ?? ???? ??? ????? ??? ????? ? ??? ?????.

AJAX? ???? ?? ?? ??????? ???? ?????? ?? ?? ?? ???? ?? ???? ???.


AJAX ?? ??

0.png

AJAX? ??? ??? ???? ???.

AJAX? ??? ??? ???? ?? ?? ?? ??? ?????.

· XMLHttpRequest ??(???) ???? ??? ??)

· JavaScript/DOM(?? ??/??)

· CSS(???? ???)

· XML(??? ??? ????? ???? ??) )

AJAX ??????? ????? ???? ???? ????!


Google Suggest

2005? Google? ?? ?? ??? ????? AJAX? ??? ?? ??????.

Google Suggest? AJAX? ???? ?? ??? ? ?????? ????. Google ???? ???? JavaScript? ??? ??? ??? ??? ?? ??? ?????.


XMLHttpRequest ??? AJAX? ???? ???.

XMLHttpRequest

XMLHttpRequest ??? AJAX ? ?????.

? ??? 2000? 7? Internet Explorer 5.5? ??? ???? ??? ? ???? ???? AJAX ? Web 2.0? ?? ????? ??? 2005??? ??? ???? ?????.

XMLHttpRequest ?? ??

?????? XMLHttpRequest ??? ???? ?? ??? ??? ?????.

Internet Explorer? ActiveXObject? ?????.

?? ????? XMLHttpRequest ?? ?? JavaScript ??? ?????.

? ??? ????? ??? ?? ??? ??? ??? ? ????.

var XMLHttp=null
if (window.XMLHttpRequest)
{
XMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
XMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}

?? ??:

1. ?? XMLHttpRequest ??? ???? XMLHttp ??? ????. ?? ?? null? ?????.

2. ?? ?? window.XMLHttpRequest ??? ??? ? ??? ??????. ? ??? Firefox, Mozilla, Opera ? Safari ????? ? ???? ??? ? ????.

3. ?? ??? ?? ?? ???? ? ??? ????. XMLHttp=new XMLHttpRequest()

4. ??? ? ?? ?? window.ActiveXObject? ??? ? ??? ?????. ? ??? Internet Explorer ?? 5.5 ???? ??? ? ????.

5 ??? ?? ??? ???? ? ??? ????. XMLHttp=new ActiveXObject()


??? ?

?? ?????? ??? ?? ?? ??? XMLHttpRequest ??? ???? ?? ?????.

?? ???? Internet Explorer 6?? ??? ? ?? Microsoft? ?? ??? "Msxml2.XMLHTTP"? ????? ?????. ??? ? ?? ?? Internet Explorer 5.5 ? 5.5?? ??? ? ?? "Microsoft.XMLHTTP"? ?????.

?? ???? ?? ?????.

function GetXmlHttpObject()
{
var xmlHttp=null;

try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch(e)
{
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP ");
}
catch(e)<

?? ??:



1. ?? ?? XMLHttpRequest ??? XMLHttp ??? ?????. ?? ?? null? ?????.

2. ? ??(Mozilla, Opera ? Safari)? ?? ?? ??: XMLHttp=new XMLHttpRequest()
3. Internet Explorer 6 ?? ????? Microsoft ??? ?? ??? ?????. ?? ??: XMLHttp=new ActiveXObject("Msxml2.XMLHTTP")

4. ??? ???? ?? ??(Internet Explorer 5.5)? ??? ????. XMLHttp=new ActiveXObject("Microsoft.XMLHTTP")

?

?? AJAX ??? ?????

PHP ?????? AJAX ?? ???? ??? ????????. ?? ???? ?? ???? ??? ????? ? ? ????. PHP? ?? ????? ???????.

AJAX? ?? ??? ????? AJAX ????? ?????.

???? ??
||
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>PHP中文網(wǎng)(php.cn)</title> <script> function showHint(str) { if (str.length==0) { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) { // IE7+, Firefox, Chrome, Opera, Safari 瀏覽器執(zhí)行的代碼 xmlhttp=new XMLHttpRequest(); } else { //IE6, IE5 瀏覽器執(zhí)行的代碼 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","ajax_php.php?q="+str,true); xmlhttp.send(); } </script> </head> <body> <p><b>在輸入框中輸入一個(gè)姓名:</b></p> <form> 姓名: <input type="text" onkeyup="showHint(this.value)"> </form> <p>返回值: <span id="txtHint"></span></p> </body> </html>