//class
this.state = {
inpVal : ‘helloworld‘
};
//render
<input type="text" onChange={this.my_filter.bind(this)} defaultValue={this.state.inpValu}/>
react 获取input的值 ref 和 this.setState({})
原文:https://www.cnblogs.com/alchemist-z/p/12249003.html