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

84
Views
Display HTML with live form input field

I'm wanting to have multiple input fields have a live output without having to hit submit and have the ability to copy/paste the output.

Ex:

<input id="name1">
<input id="name2">

IF name1 is not empty, then display: Hi name1

IF name1 and name2 is not empty, then display: Hi name and name2

I saw another post: Printing field input data live with Javascript that comes close to what I'm looking for but not quite.

This might be something simple but I'm struggling with it.

Thanks

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

0

You can to handler it with javascript

// select element input
const input = document.querySelector('input');

// select element output
const log = document.getElementById('values');

// event listener invoke when something change in input
input.addEventListener('input', updateValue);

// method 
function updateValue(e) {
log.textContent = e.target.value;
}

more : Run javascript after input is complete

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!