Ajax
English [?e?e?d??ks] US [?e?d??ks]
n. ?? ??? "Asynchronous JavaScript and XML"(??? JavaScript ? XML)???. ; Ajax ??-??-? ??? ??, Yajis ???
English [???] US [s?nd]
vt ???(?? ??); state) ) vt.& vi. ??? ???, ?? ??? vi. ????, ???, ?? ??? adj [????? ???]
ajax axSend() ?? ???
??: ajaxSend() ???? AJAX ??? ??? ? ??? ?????. ??? ??????.
??: ??.ajaxSend([function(event,xhr,options)])
????:
Parameters | Description |
function(event,xhr, ??) | ???. ??? ??? ? ??? ????? ?? ?????. ?? ????: event - ??? ??? ?????. xhr - XMLHttpRequest ??? ?????. options - AJAX ??? ???? ??? ?????. |
??: XMLHttpRequest ?? ? ??? ?? ??? ?? ??? ?????.
ajax axSend() ?? ?
<html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div").ajaxSend(function(e,xhr,opt){ $(this).html("正在請(qǐng)求:" + opt.url); }); $("button").click(function(){ $("h2").text("文本已經(jīng)改變"); alert("請(qǐng)求成功"); }); }); </script> </head> <body> <div id="txt"><h2>通過 AJAX 改變文本</h2></div> <button>改變內(nèi)容</button> </body> </html>
??? ????? ??? "???? ??" ??? ?????