fantom2359,
не создавайте темы в этом разделе, есть
Общие вопросы Javascript
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
p{
text-align: center;
padding: 4px;
}
.my_button{
margin: 24px;
}
</style>
</head>
<body>
<form name="form1">
<table align="center">
<tr>
<td align="center" border="1" bgcolor="blue">
Утренний сеанс<br>
<input type="radio" name="seans" value="100" checked>09:00
<input type="radio" name="seans" value="120" >11:20
<input type="radio" name="seans" value="140" >13:30
</td>
<td align="center" border="1" bgcolor="green">
Дневной сеанс<br>
<input type="radio" name="seans" value="160" >15:40
<input type="radio" name="seans" value="200" >17:10
<input type="radio" name="seans" value="220" >19:30
</td>
<td align="center" border="1" bgcolor="orange">
Вечерний сеанс<br>
<input type="radio" name="seans" value="250" >21:50
<input type="radio" name="seans" value="280" >01:10
<input type="radio" name="seans" value="350" >03:40
</td>
</tr>
</table>
<p>
<label>Кол-во билетов:<INPUT type="text" name="num1" size=5></label>
<label>Общая цена <INPUT type="text" name="sumb" size=5 readonly="readonly"></label><br>
<INPUT type="button" value="Оплатить" onClick="sumbat()" class="my_button"></p>
</form>
<script>
window.addEventListener('DOMContentLoaded', function() {
var form = document.querySelector('[name="form1"]'),
num = document.querySelector('[name="num1"]'),
sum = document.querySelector('[name="sumb"]');
function sumballl()
{
var chec = document.querySelector('[name="seans"]:checked');
sum.value = (num.value = +num.value||0) * (chec.value||0)
}
form.addEventListener('change', sumballl);
form.addEventListener('input', sumballl);
});
</script>
</body>
</html>