ren 分享图片 小写字母 urn png nbsp spa alt bubuko
React 添加一个事件 以点击事件为例 一般家在 render 渲染里
- 添加一个事件(在标签中用html原生元素以小写字母开头(onClick))
React 添加一个事件
- render:function(){
- 添加一个事件(在标签中用html原生元素以小写字母开头(onClick))
- return (<h2 onClick={this.handleClick}>点我!点击次数为:{this.state.clickCount}</h2>);
- }
来源: http://www.bubuko.com/infodetail-2450031.html