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

178
Views
form value fill using javascript

i am filling this value using javascript code. after that i am able to see this value in cosole. but value not visible in box. due to this i am unable to click submit button.this element is in a form tag.images link https://i.stack.imgur.com/quZ8f.png https://i.stack.imgur.com/r9KgX.jpg

function myfn(){
  document.getElementsByName("ELEC_CURR_B_PHASE").value="415V";
  var x= document.getElementsByName("ELEC_CURR_B_PHASE").value="415V";
  console.log(x);

};myfn()

result after running code
inspect element image

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

0

getElementsByName() returns a NodeList and to set the property value, select the first index.

function myfn(){
  document.getElementsByName("ELEC_CURR_B_PHASE").value="415V";
  var x= document.getElementsByName("ELEC_CURR_B_PHASE")[0].value="415V";
  console.log(x);
};
myfn();
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!