Ajax

English [?e?e?d??ks] US [?e?d??ks]

n. ?? ??? "Asynchronous JavaScript and XML"(??? JavaScript ? XML)???. ;Ajax ??-??-? ??? ??, Yajis ???

setup

English['set?p] US[?s?t??p]

n.Plan;<口>Organization;Posture;<口> ??? ?? ??? ??? ??

??? ajaxSetup() ??? ???

??: jQuery.ajaxSetup() ???? ?? AJAX ?? ??? ?????.

??: ??jQuery.ajaxSetup(??:?, ??:?, ...)

????:

??? ajaxSetup() ??? ?

<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(){
  $("button").click(function(){
    $.ajaxSetup({url:"http://img.php.cn/upload/article/000/005/656/5af270fd37755429.jpg",error:function(result){
     alert("請求失敗");}});
    $.ajax();
  });
});
</script>
</head>

<body>

<div id="txt"><h2>通過 AJAX 改變文本</h2></div>
<button>改變內(nèi)容</button>

</body>
</html>
???? ?? ?

??? ????? ??? "???? ??" ??? ?????

ParametersDescription
name:value ?? ?????. ??/? ?? ???? AJAX ??? ?? ??? ?????.
<button id="e4gx4"><pre id="e4gx4"></pre></button>