1.获取value值
1.input/radio
<Input onBlur={this.blurcheck.bind(this)} type="password" autoComplete="new-password" key="114" /> <RadioGroup key={"122"} onChange={this.changeV}> <Radio value="1">是</Radio> <Radio value="0">否</Radio> </RadioGroup> changeV(e){ e.target.value //value值 string } blurcheck(e){ e.target.value //value值 string }
2.checkbox/select
<Select style={{width:"100%"}} onChange={this.change_eventSource.bind(this)}> <Option value="hdfs">HDFS</Option> <Option value="hbase">HBASE</Option> <Option value="yarn">YARN</Option> <Option value="impala">IMPALA</Option> </Select> change_eventSource(value){ value //即为select的value值 string } <Checkbox.Group style={{ width: '100%'}} className={"translate"} onChange={this.changeCheckBox}> <Checkbox value="0">小写字母</Checkbox> <Checkbox value="1">大写字母</Checkbox> <Checkbox value="2">数字</Checkbox> <Checkbox value="3">特殊字符</Checkbox> </Checkbox.Group> changeCheckBox(value){ value //即为checkbox的value值,array }