HTML:
<input type="number" ref="abc">
JS:
var id=this.$refs.abc.value;
或者使用v-model
HTML:
<input :type="inputType2"
v-model="password"
class="PwdInput"
placeholder='请设置您的密码'>
JS:
var aaa=_this.password;//获取到值var _this=this;