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

90
Views
How do you display a specific JS array element in the HTML input text Placeholder?

Let say I want to display the 45 element in the Students_C1 array in the placeholder. How should i do that ?

var Students_C1= [45,0,0,0,0];

 <input type="text" id="inputss" name="S1_C1" value="" placeholder="<**I want a specific JS array Elements Here**">
            <button style="display:none;" id="myButton" onclick="UpdateValues('inputss')">Submit</button>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can do something like this.

var Students_C1= [45,0,0,0,0];
document.getElementById('inputss').placeholder = Students_C1.join(", ");
 <input type="text" id="inputss" name="S1_C1" value="" placeholder="<**I want a specific JS array Elements Here**">
 <button style="display:none;" id="myButton" onclick="UpdateValues('inputss')">Submit</button>

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!