Rost_shat,
вариант без input и button
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Конвертер размеров обуви</title>
<script>
var Classik = [35, 35.5, 36, 36.5, 37, 37.5, 38, 38.5, 39, 39.5, 40, 40.5, 41, 41.5, 42, 42.5, 43, 43.5, 44, 44.5, 45, 45.5, 46, 46.5, 47, 47.5, 48];
var ussize = ["Размера нет", "Размера нет", 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9, 5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5, 14];
var uksize = [3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8, 8.5, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.5, 13, 13.5];
var sm = [22.2, 22.5, 23, 23.5, 24, 24.5, 25, 25.5, 26, 26.5, 27, 27.5, 28, 28.5, 29, 29.5, 30, 30.5, 31, 31.5, 32];
var eursize = [36, "36 2/3", "37 1/3", "38", "38 2/3", "39 1/3", "40", "40 2/3", "41 1/3", "42", "42 2/3", "43 1/3", "44", "44 2/3", "45 1/3", "46", "46 2/3", "47 1/3", "48", "48 2/3", "49 1/3", 50];
function toStr(a) {
return a.map(function(a) {
return a.toString()
})
}
var objSize = {
0: toStr(Classik),
1: toStr(ussize),
2: toStr(uksize),
4: toStr(sm),
3: toStr(eursize)
};
function fn(cur, val, met) {
var idx = objSize[cur].indexOf(val);
if (idx != -1 && objSize[met][idx]) return objSize[met][idx];
return false
}
function opt(i)
{
var o = document.querySelector("#user").options;
o.length = 0;
objSize[i].forEach(function(a, i) {
o[i] = new Option(a,a)
})
}
document.addEventListener("DOMContentLoaded", function() {
opt(0);
document.querySelector("#form").addEventListener("change", function(event) {
var cur = document.querySelector("#usert").selectedIndex;
if(event.target.id == "usert") opt(cur)
var val = document.querySelector("#user").value.trim(),
met = document.querySelector("#needt").selectedIndex;
document.querySelector("#result").innerHTML = "Результат: " + (fn(cur, val, met) || "ошибка ввода данных")
})
});
</script>
</head>
<body>
<div class="table">
<h2>КОНВЕРТЕР РАЗМЕРОВ </br>ОБУВИ v0.1</h2>
<img src="src/krosi.png">
<form action="" method="post" name="users" id="form" >
<h3 class="type">Выберите исходный Тип:</h3>
<select class="usersize" id="usert">
<option>Classik</option>
<option>US</option>
<option>UK</option>
<option>EUR(FR)</option>
<option>sm</option>
</select>
<h3>Выберите ваш размер</h3>
<select id="user"></select>
<h3 class="type2" id="test">В какой тип конвертировать</h3>
<select id="needt">
<option>Classik</option>
<option>US</option>
<option>UK</option>
<option>EUR(FR)</option>
<option>sm</option>
</select></br>
<h3 class="type3" id="result">Результат: 35</h3>
</form>
</div>
</body>
</html>