exzibit,
или так
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<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>Гравий 20x40</option>
<option value=4>Щебень 5х20</option>
<option value=5>Щебень 20х40</option>
<option value=6>Щебень 40х70</option>
<option value=7>Отсев щебня</option>
</select>кол-во:
<!--[if IE]> <input id="count" type="number" value=1 min=0 onpropertychange="getResult()"> <![endif]-->
<!--[if !IE]><!--> <input id="count" type="number" value=1 min=0 onChange="getResult()"> <!--<![endif]-->
<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>
<script>
function getResult() {
var b,
c,
a = document.querySelectorAll("#product, #count, #measure, #result"),
a = [{
1:{price:350,density:1630},
2:{price:150,density:1580},
3:{price:700,density:1620},
4:{price:1100,density:1360},
5:{price:1100,density:1360},
6:{price:1100,density:1400},
7:{price:300,density:1580}
}[a[0].value], a[1].value, a[2].value, a[3]];
1 == a[2] ? (b = (a[0].price * a[1]).toFixed(2),
c = (a[0].density * a[1]).toFixed(0),
b += " руб. (" + c + " кг.)") :
2 == a[2] && (b = (a[1] / a[0].density * a[0].price).toFixed(2),
c = (a[1] / a[0].density).toFixed(1), b += " руб. (" + c + " м3.) ");
a[3].innerHTML = b
};
</script>
</body>
</html>