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

+1

Multiple Drop_Down Parent

Please How Can I append children from an array of options to multiple elements with the same id. https://code.sololearn.com/WZQwaAQ2Ck7g/?ref=app Something like the code above

12/14/2020 9:12:22 AM

Ibrahim Yusuf

2 Answers

New Answer

+2

Ipang thanks man

+1

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>.