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

231
Views
The 'add' method of input elements

I've struggled to find the documentation for the add() method that's called to add Options to input elements.

I've looked on MDN here, but can't see it there or in the parent interfaces either. I was just wondering where I could find it, or what the 2nd parameter was for.

Eg:

const select = document.querySelector('.select-element');
const option = new Option(name, id);
select.add(option, undefined);
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

SO Post

Documentation for the add function

// get selector element
var daySelect = document.getElementById("myDaySelect");
// create new option
var myOption = document.createElement("option");
myOption.text = "test";
myOption.value = "value";
// add new option
daySelect.add(myOption);
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!