$.get(url, [data], [callback], [type]) 通過遠程 HTTP GET 請求載入信息;這是$.ajax的一個高級實現。
參數 描述
url 發送請求的地址
data 待發送 Key/value 參數
type 返回內容格式,xml, html, script, json, text, _default
callback 請求成功後的回調函數。參數:由服務器返回,並根據type參數進行處理後的數據
示例:
$.get("testServlet", { name: "John", time: "2pm" },
function(data){
alert("Data Loaded: " + data);
});