Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

submit form in vue

//HTML
<div id="vueRoot">
  <form ref="form">
    <input name="vitalInformation" v-model="store.vital">
    <a href="#" v-on:click="submit">SUBMIT</a>
  </form>
</div>

//JS
vm = new Vue({
  el : "#vueRoot",
  methods : {
    submit : function(){
      this.$refs.form.submit()
    }
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #submit #form #vue
ADD COMMENT
Topic
Name
5+8 =