How to get the instance name of an object

后端 未结 7 1324
萌比男神i
萌比男神i 2021-01-15 00:07

I use the below code to write code to query a web method in a specified interval.

now in the this.Poll function I have to do

this.tmo = setTimeo         


        
7条回答
  •  北海茫月
    2021-01-15 00:37

    I just wanted to say, this self trick has saved me a ton of hair pulling.

    I didn't think to create a reference like this. It means dynamically-created elements with on click events can call the correct instance of my class.

提交回复
热议问题