show different table in a form
Hello:
I am a new learner. I have a structure in html:
<form name="form" autocomplete="off">
<table>
<tr>
<td>Ethnicity Group:</td>
<td><select id="selectEthGroup" name="EthnicityGroup">
<option value="asian"> Asian</option>
<option value="white"> White</option>
<option value="all"> All Joint</option>
</select></td>
</tr>
</table>
<table id="AsianSNP">
<tr>
<th align="left">SNP [Risk Allele]</th>
<th align="left">Genotype</th>
</tr>
<tr>
<td>rs9269027 [A]</td>
<td>
<select name="ref1">
<option value="" selected></option>
<option value="2">AA</option>
<option value="1">AG</option>
<option value="0">GG</option>
</select>
</td>
</tr>
.......
</table>
<table id="WhiteSNP">
<tr>
<th align="left">SNP [Risk Allele]</th>
<th align="left">Genotype</th>
</tr>
<td>rs9271541 [C]</td>
<td>
<select name="ref6">
<!-- rs9275596 C -0.42 -->
<option value="" selected></option>
<option value="2">CC</option>
<option value="1">TC</option>
<option value="0">TT</option>
</select>
</td>
</tr>
.......
</table>
I want to show different table based on different "Ethnicity Group". My code doesn't work. Can someone show me how to do it?
Thanks.