0

how can i show the selected user info in other select tag

like the select info must be disabled on default.

so when i select name john or fred select info get enabled and i get the info for selected name

<!DOCTYPE html>
<html>

<body>
    <select>
        <option value="">SELECT data</option>
        <OPTION VALUE="john">john data</OPTION>
        <OPTION VALUE="fred">fred data</OPTION>
    </select>
    
    <select disabled>
        <option value>SELECT info</option>
        <-- when john selected show this info. this belongs to john-->
            <OPTION VALUE='age'>21</OPTION>
            <OPTION VALUE='country'>usa</OPTION>
            <OPTION VALUE='gender'>male</OPTION>

 <-- when fred selected show this info. this belongs to fred-->
            <OPTION VALUE='age'>23</OPTION>
            <OPTION VALUE='country'>uk</OPTION>
            <OPTION VALUE='gender'>male</OPTION>
        </select>
        
</body>

</html>
fred mj
  • 25
  • 3

0 Answers0