react 表单
this.handleChange(key,e){
[key]:e.target.value
}
submit=()=>{
const {userName,age,status}=this.state;
let parmas = {
userName,
age,
status
}
}
render(){
const {userName,age,status}this.state;
return(
<div>
<input type="text" value={userName} onClick={this.handleChange.bind(this,'userName')}/>
<input type="text" value={age} onClick={this.handleChange.bind(this,'age')}/>
<input type="text" value={status} onClick={this.handleChange.bind(this,'status')}/>
<button onClick={this.submit}>提交</button>
<div>
)
}