$.get(url, data, callback, dataType) can retrieve data from a server:
$ is a jQuery object and .get() is a global function
dataType can be one of:
HTML, XML, JSON, string, or script
$.getJSON(url, data, callback) can retrieve JSON data from a server
Demo Example:
CustomerJson.aspx.cs
$.get(url, data, callback, dataType)
$.getJSON(url, data, callback)
Additional Notes:
1. http://james.padolsey.com/jquery
2. .load() is always HTML datatype
3. .load() without data –> it’s a GET request
4. .load() with data –> become POST request
沒有留言:
張貼留言