}; //render <input type="text" ref={input => this.input = input} defaultValue = 'helloworld!' /> <button onClick = {this.my_filter.bind(this, reg)}> 确定 </button> 2、this.setState({})
//class
this.state = {
inpVal : 'helloworld'
};
my_filter(e){ this.setState({ inpValu:e.target.value }) };
//render
<input type="text" onChange={this.my_filter.bind(this)} defaultValue={this.state.inpValu}/>