-6

I have a dropdown list like this one:

<form id="link">
   <select id="muni">

       <option value="1100015"> A   </option>
       <option value="1100379"> B   </option>
       <option value="1100403"> C   </option>
       <option value="1100346"> D   </option>
       <option value="1100023"> I   </option>
       <option value="1100452"> F   </option>
       <option value="1100031"> G   </option>    
   </select>

I want a specific image to be displayed when an option is selected. The image will have the value name of the option.

Example: If I select the option "A", an image named "1100015.jpg" will be displayed in the page.

  • 1
    Side note: Keep in mind that the spaces in the values count as characters. Edit: This as per the original post https://stackoverflow.com/revisions/47908208/1 – Funk Forty Niner Dec 20 '17 at 14:28

1 Answers1

-1

You could use that said values to change the way one background of a div (where you want to) change. Please read this thread: The best way to add images in <select> <option>.

JPeter
  • 177
  • 12