Javascript 在ReactJS中的所有嵌套HTML元素中处理事件
在构建表时,我将onClick处理程序绑定到td元素:Javascript 在ReactJS中的所有嵌套HTML元素中处理事件,javascript,reactjs,Javascript,Reactjs,在构建表时,我将onClick处理程序绑定到td元素: 去除 <td> <button type="button" className="btn btn-default btn-default" onClick={this.removePerson.bind(this, person.id)}> <span className="glyphicon glyphicon-remove" aria-h
去除
<td>
<button
type="button"
className="btn btn-default btn-default"
onClick={this.removePerson.bind(this, person.id)}>
<span className="glyphicon glyphicon-remove" aria-hidden="true">Remove</span>
</button>
</td>
...
removePerson(id) {
// do stuff
}
...