`
kongshanxuelin
  • 浏览: 913174 次
  • 性别: Icon_minigender_1
  • 来自: 宁波
社区版块
存档分类
最新评论

JQuery学习的难得资料

阅读更多

老外写的学习JQuery例子,代码理解颇有难度,对你的学习肯定有帮助,直接下载吧,祝你好运!

代码片段:

// The .bind method from Prototype.js
Function.prototype.bind = function(){
  var fn = this, args = Array.prototype.slice.call(arguments), object = args.shift();
  return function(){
    return fn.apply(object,
      args.concat(Array.prototype.slice.call(arguments)));
  };
};
 
function isNimble(){ return true; }
var canFly = function(){ return true; };
window.isDeadly = function(){ return true; };
log(isNimble, canFly, isDeadly);
 
var ninja = {
  yell: function(n){
    return n > 0 ? arguments.callee(n-1) + "a" : "hiy";
  }
};
assert( ninja.yell(4) == "hiyaaaa", "arguments.callee is the function itself." );
 
分享到:
评论
3 楼 Jtr 2008-10-16  
好东西,顶一个
2 楼 achun 2008-09-29  
这是jQuery作者John Resig博客上的幻灯片里的代码
http://ejohn.org/apps/learn/
由浅到深的讲解js,从中可以看到jQuery的思想。
1 楼 wnick 2008-09-27  
什么东西哦?
都没有点点介绍

相关推荐

Global site tag (gtag.js) - Google Analytics