How to add a text to an input via javascript?

Asked

Viewed 86 times

-4

inserir a descrição da imagem aqui

I want to insert a text in the 2 image inputs but only via javascript with DOM manipulation. How do I do that?

  • Look my dear I made for you https://prnt.sc/t9amv3 with JS not to put a text inside an image

1 answer

1


I’m not sure I understand, but if you understand.

First you capture the input you want in javascript, something like:

const ipt = document.getElementById('id_do_input');

and later changes its value property.

ipt.value = 'teste';

Browser other questions tagged

You are not signed in. Login or sign up in order to post.