What would be the JavaScript code to display the input field if I choose the second <option>
tag and reverse (do not display input) if I choose the first <option>
?
<div id="bmi">
<p id="head">
BMI Calculator
</p>
<p><b>Select the Measure
<select id="method" onchange="standard()">
<option id="metric">Metric</option>
<option id="standard">Standard</option>
</select>
</b></p>
<p><b>Input your Height Below:</b></p>
<br>
<input type="text" id="height" />
<p><b>Input your Weight Below:</b></p>
<input type="text" id="weight" />
<br>
<button id="onSubmit">Calculate</button>
<br>
<h1 id="result"></h1>
</div>
Comments
Post a Comment