Which of the following is correct syntax for a button click event handler, foo?

Question:Which of the following is correct syntax for a button click event handler, foo?

1.<button onclick=this.foo()>

2.<button onclick=this.foo>

3.<button onClick={this.foo()}>

4.<button onClick={foo}>


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!