S
S
semki0962019-06-06 17:59:36
Vue.js
semki096, 2019-06-06 17:59:36

How to handle the select event?

There is a radio button, by clicking on which you need to perform an alert.

<input v-on:select.native="selEvent" type="radio" >

I'm trying this - it doesn't work. I will be grateful for help.
methods: {
              selEvent: function(){
                  alert('play');
              }
          }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alex, 2019-06-06
@semki096

<input @change="selEvent($event.target.checked)" type="radio">

methods: {
  selEvent(checked) {
    if (checked) {
      alert('play')
    }
  }
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question