Показать сообщение отдельно
  #5 (permalink)  
Старый 16.01.2013, 21:36
Аватар для рони
Профессор
Отправить личное сообщение для рони Посмотреть профиль Найти все сообщения от рони
 
Регистрация: 27.05.2010
Сообщений: 33,084

len-in,
Вариант...
<!DOCTYPE HTML>
<html>
<head>
<title>page</title>
<script type="text/javascript">
var test = 0 ;
function union_chbox_orientations(a) {
    "box_orientation0" != a.id && (a.checked ? test++ : test--);
    if ("box_orientation0" == a.id && a.checked || 3 == test) {
        for (i = 0; 4 > i; i++) document.getElementById("box_orientation" + i).checked = 0 < i ? !1 : !0;
        test = 0
    } else document.getElementById("box_orientation0").checked = !1;
    return !0
};
</script>
</head>
<body>
<div class="conteiner_orientations">
<p>Orientation:</p>
<input type='checkbox' name='name' value='all orientations' id='box_orientation0' onClick='return union_chbox_orientations(this)'><img src='/'/>
	<label for='box_orientation0'>all orientations</label><br>
<input type='checkbox' name='name' value='vertical' id='box_orientation1' onClick='return union_chbox_orientations(this)'><img src='/'/>
	<label for='box_orientation1'>vertical</label><br>
<input type='checkbox' name='name' value='horizontal' id='box_orientation2' onClick='return union_chbox_orientations(this)'><img src='/'/>
	<label for='box_orientation2'>horizontal</label><br>
<input type='checkbox' name='name' value='square' id='box_orientation3' onClick='return union_chbox_orientations(this)'><img src='/'/>
	<label for='box_orientation3'>square</label><br>
</div>
</body>
</html>
Ответить с цитированием