Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
(Vue js) change the vue data by click the button

I would like to click the button and change the vuejs data in formdata.eventname. But it does nothing after I click the button

Moreover, I don't know how to use vue.js in stackoverflow. If you know it, plz help me to edit the question

< script src = "https://unpkg.com/vue" >
<script >
  new Vue({
    el: "#app",
    data: {
      total: parseInt("<%= total %>"),
      events: [],
      current: 1,
      perPage: 2,
      rangeBefore: 1,
      rangeAfter: 1,
      order: "",
      size: "",
      isSimple: false,
      isRounded: false,
      prevIcon: "chevron-left",
      nextIcon: "chevron-right",
      formdata: {
        eventname: "eventname2",
        organizer: "",
        starttime: "",
        endtime: "",
        venue: "",
      },
    },
     methods: {
      submitform: async function () {
        this.formdata.eventname = "eventname1";
      },
  }); 
</script>
<button class="button is-link" @click="submitform()">Submit</button>

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I make a stupid mistake. I didn't put the button inside the app.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!