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); }, } });
语法解释: $("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text var checkValue=$("#select_id").val(); //获取Select选择的Value