close

Ajax , 其實就是 Asynchronous JavaScript and XML 的縮寫,  

就是利用Javascript與XML的技巧來達到動態網頁中的非同步運作 , 

讓使用者不需要去等待網頁進行重新loading的技術.

而在jquery中 , 也提供了一些method來支持這樣的技巧 , 

以下列的例子來看:

$.ajax({

url:'../servlet/ServletClass',

type:'get',

dataType:'json',

data: SnapshotWizardReqParam, 

success:SnapshotWizard_addResp

});

$.ajax就是ㄧ個jquery所提供的method , 在其中還可以包含各種參數,像:

url : Specifies the URL to send the request to.

type : Specifies the type of request

data : Specifies data to be sent to the server

dataType : The data type expected of the server response.

success : A function to be run when the request succeeds


ref : http://www.w3schools.com/jquery/ajax_ajax.asp


arrow
arrow
    全站熱搜

    JerryCheng 發表在 痞客邦 留言(0) 人氣()