Answer the question
In order to leave comments, you need to log in
How to modify data in a third party form created in vue via javascript?
Can you please tell me how you can change the data in the form if the site is written in vue?
There is a site that displays a form for questions. I want to fill out this form, but not by hand, but through javascript.
I do like this:
let domme = document.querySelectorAll('input')
domme[1].value = 'Hello world'
Answer the question
In order to leave comments, you need to log in
It is necessary to forward the input event.
Or change if the input has v-model.lazy
let domme = document.querySelectorAll('input')
domme[1].value = 'Hello world'
domme[1].dispatchEvent(new Event('input'));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question