React onClick - pass event with parameter

后端 未结 5 707
半阙折子戏
半阙折子戏 2020-12-22 17:33

Without Parameter

function clickMe(e){
  //e is the event
}


With Para

5条回答
  •  臣服心动
    2020-12-22 18:05

    Try this:

    
    

    And in your function:

    function clickMe(event, someParameter){
         //do with event
    }
    

提交回复
热议问题