Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue submit form

data: function(){
     return {
       name: "",
       price: "",
   }
},
 methods: {
    addProduct(e){
      e.preventDefault() // it prevent from page reload
      // console.log(this.name, this.price);
    }
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #vue #submit #form
ADD COMMENT
Topic
Name
4+3 =