例:
render( <div> <a onclick = {this.dealOnclick.bind(this, "参数1", "参数2")}>点击</a> </div> ) dealOnclick = (canshu1, canshu2, event) => { console.log(canshu1); console.log(canshu2); console.log(event); }
例:
render( <div> <a onclick = {this.dealOnclick.bind(this, "参数1", "参数2")}>点击</a> </div> ) dealOnclick = (canshu1, canshu2, event) => { console.log(canshu1); console.log(canshu2); console.log(event); }
本文标题:react怎么给绑定的onclick事件传递除event对象之外
本文链接:https://www.haomeiwen.com/subject/akbewhtx.html
网友评论