これがヘッダーです。結果は新しいページに表示されますが、コードが実行されているのと同じページに結果を表示したいと思います。助けてください。
function calculate() {
var width = document.getElementById("width");
width1 = width.options[width.selectedIndex].text;
var height = document.getElementById("height");
var height1 = height.options[height.selectedIndex].text;
var calculate = width1 * height1 * 3;
result.innerHTML = "<div>" + calculate + "</div>";
}
体
Choose Width
<select id="width" name="height" onchange="calculate()">
<option>1</option>
<option>1</option>
</select>
<br/>
Choose Heiht
<select id="height" name="height" onchange="calculate()">
<option>1</option>
<option>2</option>
</select>