第一个参数不要直接使用函数 ,而是使用匿名函数function(){},要执行的函数写在匿名函数内部就行了。 转自:https://blog.youkuaiyun.com/derkampf/article/details/79417090