gloomer88,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
</head>
<body>
<script>
function imgchange()
{
var tip = document.querySelector('[name="tip"]:checked').value,
color = document.querySelector('[name="color"]:checked').value
srcAll = {'t1': {'jelt' : '1', 'fio' : '2', 'sin': '3'}, 't2': {'jelt' : '4', 'fio' : '5', 'sin': '6'}};
alert(srcAll[tip][color])
};
</script>
<form class="s_form" action="index1.php" method="POST" name="s_form" onchange="imgchange()">
цвет
<input type="radio" name="color" checked="checked" value="jelt" />желтый
<input type="radio" name="color" value="fio" />фиолетовый
<input type="radio" name="color" value="sin" />синий
тип
<input type="radio" name="tip" value="t1" />тип1
<input type="radio" name="tip" value="t2" checked="checked" />тип2
<input class="s_submit" type="button" value="отправить">
</form>
</body>
</html>
|