Vue

by D7460N

HTML

<div id="app">
  <select name="LeaveType" @change="onchange()" class="form-control" v-model="key">
    <option value="1">Annual Leave/ Off-Day</option>
    <option value="2">On Demand Leave</option>
  </select>
  <select name="LeaveType2" @change="onchange2()" class="form-control" v-model="key2">
    <option value="3">Annual Leave/ Off-Day</option>
    <option value="4">On Demand Leave</option>
  </select>
</div>

CSS

body {
  background: #20262E;
  padding: 20px;
  font-family: Helvetica;
}

#app {
  background: #fff;
  border-radius: 4px;
  padding: 20px;
  transition: all 0.2s;
}

li {
  margin: 8px 0;
}

h2 {
  font-weight: bold;
  margin-bottom: 15px;
}

del {
  color: rgba(0, 0, 0, 0.3);
}

Vue

new Vue({
  el: "#app",
  data: {
    key: "",
    key2:"",
  },
  methods: {
  	onchange: function() {
    	console.log(this.key)
      alert(this.key)
    },
    onchange2: function() {
    	console.log(this.key2)
      alert(this.key2)
    }
  }
})