在react中通过ref获取input值
1
2
3
4
5
6
this.refs.user.value
this.refs.pwd.value
<input type="text" ref="user" />
<input type="password" ref="pwd" />
1
2
3
4
5
6
this.refs.user.value
this.refs.pwd.value
<input type="text" ref="user" />
<input type="password" ref="pwd" />