<form name="revers">
<table>
<tr>
<td>
<select id="height">
<option value="0">160</option>
<option value="1">161</option>
<option value="2">162</option>
</select></td>
</tr>
<tr>
<td><input type="button" value="Calculate"
onclick="calculate( );"></td>
</tr>
</table>
</form>
function calculate( ) {
var a = height.options[height.selectedIndex].text;
var b = [161,162,163];
for (i = 0; i < b.length; i++) {
if (b[i] = a)
document.write(i);
}
}