Access the variable from a event-handler function outside that function

前端 未结 0 1918
感情败类
感情败类 2021-01-02 15:24

I have the JQuery code below.

let a = 1; //outside the function

$(".class").click(function(e){
  a = 2; //modified the value of \'         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题