Multiple Drop_Down Parent | Sololearn: Learn to code for FREE!


Multiple Drop_Down Parent

Please How Can I append children from an array of options to multiple elements with the same id. Something like the code above

12/14/2020 9:12:22 AM

Ibrahim Yusuf

2 Answers

New Answer


Ipang thanks man


Use `class` rather than `id` when you target multiple elements. Then you can use querySelectorAll() to collect all <select> under that class and add an option for each <select>.