如何获得el-input输入框中的数据,适用于普通input
2,方法3,menthods这样就可以实现获得el-input输入框中的内容了,此方式对普通的input也适用
·
1,el-input
<el-input
placeholder="请输入内容"
v-model="no"
clearable
size="mini"
id= "aNo">
</el-input>
2,方法
<el-button type="primary" size="mini" @click="test">测试</el-button>
3,menthods
methods:{
test(){
let no = document.getElementById('aNo').value;
console.log(no)
}
}
这样就可以实现获得el-input输入框中的内容了,此方式对普通的input也适用
更多推荐
所有评论(0)