Jamesx,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
</style>
<script>
document.addEventListener('DOMContentLoaded', function() {
var USD = {1 : 6600/1 ,2: 233/1,3: 667/1,4: 277/1},
EUR = 1.33,
GBP = .88,
rate = { 1 : 1, 2 : EUR, 3 : GBP},
input = document.querySelector('[name="am"]'),
out = document.querySelector('[name="TbOutSum"]'),
selFrom = document.querySelector('[name="D1"]'),
selTo = document.querySelector('[name="D2"]'),
inputToOut = true,
num = 0;
function fn()
{
if(inputToOut) {
num = input.value.trim();
num = num.replace(",",".").replace(/[^\d.]/,"");
num = +num || 0;
num *= USD[selFrom.value];
num *= rate[selTo.value];
out.value = num.toFixed(2);
}
else {
num = out.value.trim();
num = num.replace(",",".").replace(/[^\d.]/,"");
num = +num || 0;
num /= rate[selTo.value];
num /= USD[selFrom.value];
input.value = num.toFixed(2);
}
}
input.addEventListener('input',function() {inputToOut = true; fn()});
out.addEventListener('input',function() {inputToOut = false; fn()});
selFrom.addEventListener('change', fn);
selTo.addEventListener('change', fn);
});
</script>
</head>
<body>
<input name="am" placeholder="1" >
<select name="D1" >
<option selected value="1">BTC</option>
<option value="2">ETH</option>
<option value="3">BCH</option>
<option value="4">LTC</option>
</select>
<input name="TbOutSum" id="TbOutSum" >
<select name="D2" >
<option selected value="1">USD</option>
<option value="2">EUR</option>
<option value="3">GBP</option>
</select>
</body>
</html>