var button = document.getElementById("button_count");
button.onclick = function(){
var size = document.getElementById("page_size").value,
page_color = document.getElementById("color").value,
page_num = document.getElementById("qty").value,
cover=document.getElementById("cover").value,
binding = document.getElementById("binding").value,
edit = document.getElementById("edition").value,
price_size = 0,
price_color = 0,
price_cover = 0,
price_binding = 0;
switch(size){
case "A4" : price_size = 4.15;
break;
case "A5" : price_size = 4;
break;
case "A6" : price_size = 3.10;
break;
case "gen": price_size = 2.15;
break;
}
switch(page_color) {
case "bw" : price_color = 1.20;
break;
case "col" : price_color = 2.45;
break;
}
switch(cover) {
case "bw" : price_cover = 10;
break;
case "col" : price_cover = 12;
break;
case "sk" : price_cover = 16;
break;
case "lam" : price_cover = 21.20;
break;
}
switch(binding) {
case "soft" : price_binding = 14;
break;
case "solid" : price_binding = 21;
break;
case "staples" : price_binding = 12;
break;
case "spring" : price_binding = 32;
break;
}
var ans = (price_size*page_num + price_color + price_cover + price_binding)*edit;
document.getElementById("out").innerHTML = ans + "руб";
alert("подключен");