国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

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>