我想看看函数$ .get()这个函数的来源
我怎么能继续这样做,我下载了Jquery 1.7开发者版本,但无论如何都无法在其中找到这个功能......
这些是$ .ajax函数的别名.查看此文件中的第7150行
http://code.jquery.com/jquery-1.7.js
jQuery.each( [ "get", "post" ], function( i, method ) {
jQuery[ method ] = function( url, data, callback, type ) {
// shift arguments if data argument was omitted
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
data = undefined;
}
return jQuery.ajax({
type: method,
url: url,
data: data,
success: callback,
dataType: type
});
};
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
55 次 |
| 最近记录: |