vue-输入框change事件并获取值

1.html

<input type="text" @change="specifiName($event)" />

2.js

var vm = new Vue({
    el: "#app",
    methods: {
      specifiName(e) {
        var that = this;
        var val = e.target.value;
        console.log(val);
      },
    }
});

猜你喜欢

转载自www.cnblogs.com/zhizou/p/10648513.html
今日推荐