Passing variables in jquery

后端 未结 4 1961
小鲜肉
小鲜肉 2021-01-25 04:52

What is the best way to pass the var full to function b. I don\'t want to use global variables. Is return the only option.



        
4条回答
  •  梦毁少年i
    2021-01-25 05:07

    Unless you dont want function b to exist, or used outside outside of the click function, i would move it outside the anonymous function. And then just specify the arguments in the definition then just pass them like normal

    Example

    
    

提交回复
热议问题