为什么这个错误(jquery-1.7.1.js:3256 Uncaught TypeError: Object 50 has no method 'apply' Uncaught TypeError: Object 50 has no method 'apply'
):传递函数的参数作为参数传递给另一个函数
var func = function(foo) {
// some code
});
$('.some_class').keyup(func('bar'));
非常感谢:)。
因为'FUNC( '巴')'可能返回'undefined'。你必须将一个函数传递给'keyup'。 – 2012-02-10 11:41:18
可能的重复[尝试传入回调函数失败](http://stackoverflow.com/questions/6811746/trying-to-pass-in-a-callback-function-fails) – 2012-02-10 11:42:44