Enter information in input and shows the information on the div's textContent simultaneously

I’m a HTML JS beginner.
Right now I’m doing a Meme generator project and I encounter a problem

this is my HTML code

//this is input tag

<div>
<input type="text" placeholder = 'text' class="mtext">
<input type="text" placeholder = 'text' class="mtext">
</div>

//this is my div block.

<div id = "meme">
     <div class="mtext1" style = 'left: 5px; top: 5px; width: 400px; height: 25px'></div>
     <div class="mtext1" style = 'left: 5px; top: 5px; width: 400px; height: 25px'></div>
</div>

and my thought is wanting to use "addEventListener" to solve this problem.


const  inputText = document.querySelectorAll('.mtext')
const showTextBox = document.querySelectorAll('.mtext1')


inputText.addEventListener('????' , function(){
  showtextbox.textContent += 

})

the first problem is what addEventListener parameter is proper to meet my expectation? That I can type into the text box and shows the result on div box at the same time.

the second problem is my inputText and showTextBox are array-like value, how can I extract the value for each of inputText and represent to the right showTextBox?

Thank you

114 thoughts on “Enter information in input and shows the information on the div's textContent simultaneously”

  1. pharmacie de garde aujourd’hui saint omer pharmacie grand avignon , pharmacie de garde marseille de nuit pharmacie rue des jacobins amiens , Seroplex sans ordonnance France, Acheter Seroplex 10 mg pas cher. Seroplex sans ordonnance France Seroplex pas cher [url=https://truerxuk.asso-web.com/#]Seroplex Lexapro 10 mg[/url] traitement uv piscine Ciprofloxacine prix sans ordonnance, Ciprofloxacine livraison France. Ciprofloxacine sans ordonnance France Ciprofloxacine pas cher [url=https://truegoum.asso-web.com/#]Ciprofloxacine pharmacie France[/url] , therapies e act therapie acceptation engagement , pharmacie ouverte paris 16. therapie cognitivo comportementale quimper Amoxicillin pharmacie France, Amoxicillin livraison France. Amoxicillin pharmacie France Amoxicillin pas cher [url=https://canada72check.asso-web.com/#]Acheter Amoxicillin 500 mg pas cher[/url] , pharmacie de garde aujourd’hui nimes pharmacie beaulieu reunion, pharmacie annecy novel pharmacie angers chapeau de gendarme . therapie cognitivo comportementale montreal, medicaments kyste ovarien act therapy online resources therapie act avis .

    Reply
  2. i need a loan, i need loan embassy finder. i need a loan now need loan now need a loan i need a quick loan no credit check, do cash advance loans help your credit, cash advances, cash advance online, cash advance loans online bad credit. Bank study of those business, terms of the payment .

    Reply