I am still learning javascript and I have problem with my current application
From this fiddle, it’s not working but it can roughly show what I want to achieve.
My output if I chose Banana & Mouse will be:
Banana is yellow
Mouse is small
I want to know how I can call the second function with just one click of the button, and how can I reuse my codes in this case as I have another 5 more select options at the end it.
Thanks!
You can just pass the ids as parameters to the function and manipulate each element value accordingly.
DEMO