function getResult(){
var table= {
1:{price:350,density:1630},
2:{price:650,density:1580},
3:{price:700,density:1620},
};
var price=0,value=0;
if (measure.value==1) {
price=((table[product.value].price*count.value).toFixed(2));
value=((table[product.value].density*count.value).toFixed(0));
result.innerHTML=price+' руб. ('+value+' кг.)'
}
else if (measure.value==2) {
price=((count.value/table[product.value].density*table[product.value].price).toFixed(2));
value=((count.value/table[product.value].density).toFixed(1));
result.innerHTML=price+' руб. ('+value+' м3.) '
}
}
<form onsubmit="return false;" oninput="getResult()">
<select size=1 id=product onChange="getResult()">
<option value=1 selected>Песок</option>
<option value=2>Гравий</option>
<option value=3>Щебень</option>
</select>кол-во:
<input id="count" type="number" value=1 min=0 oninput="getResult()">
<select size=1 id="measure" onChange="getResult()">
<option value=1 selected>м3</option>
<option value=2>кг</option>
</select>
Цена: <span id="result">350 руб. (1300 кг.)</span>
</form>
html форма никак не обрабатывается експлорером