How to pass the button value into my onclick event function?

后端 未结 5 2039
失恋的感觉
失恋的感觉 2020-12-24 13:12
test

The dosomething function evoked when to click the button,how can pa

5条回答
  •  孤城傲影
    2020-12-24 13:59

    Maybe you can take a look at closure in JavaScript. Here is a working solution:

    
    
        
            
            Test
        
        
            

    Button 0

    Button 1

    Button 2

提交回复
热议问题