Passing variables in jquery

后端 未结 4 1966
小鲜肉
小鲜肉 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条回答
  •  执念已碎
    2021-01-25 05:17

        // define b
        function b(full) {
            alert(full);
        }
    

    Actually, you aren't using global variables. You're defining them inside the JQuery anonymous function bound to the body element.

提交回复
热议问题