crystaltrumpet,
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<form name="pay_is" action="" method="post" id="pay_is">
<table border="0" align="center">
<tr>
<td>
<input type="hidden" name="m" value="<?=$fk_merchant_id?>">
<div id="whats">
Введите сумму в [RUB]:
</div>
<div id="whats1">
<input type="number" value="100" name="sum" size="7" id="psevdo"> Вы получите
<span id="res_sum">10000</span> материала
</div>
</td>
</tr>
<tr>
<td>валюта: <select size="1" name="service" id="selsel">
<option selected="selected" value="100">
рубли
</option>
<option value="7000">
доллары
</option>
</select></td>
</tr>
<tr>
<td align="center"><input type="submit" name="pay_is" class="sumserf2" value=
"обменять"></td>
</tr>
</table>
</form>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('#pay_is').addEventListener('input',
function() {
var price = document.querySelector('#selsel').value,
num = +document.querySelector('#psevdo').value||0,
sum = price * num,
str = "Введите сумму в " + (price == 100 ? "[RUB]" : "[USD]");
document.querySelector('#res_sum').innerHTML = sum;
document.querySelector('#whats').innerHTML = str;
})
});
</script>
</body>
</html>