olegalimov,
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Документ без названия</title>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>
<form name="domain" method="post" id="domain">
<input type="checkbox" class="toCheck" name="id1" value="1" /> Справочник HTML<br />
<input type="checkbox" class="toCheck" name="id3" value="2" /> Описание свойств CSS<br />
<input type="checkbox" class="toCheck" name="id2" value="3" /> Примеры готовых JavaScript`ов
<br />
<input type="button" onclick="sel('checked')" value='Отменить' > <br />
<input type="button" onclick="sel()" value='Выделить' >
</form>
<script>
function sel(opt) {
var checks = document.getElementById('domain').getElementsByTagName('input');
if(opt){
for (var i = 0; i < checks.length; i++) {
var check = checks[i];
check.checked = opt;
}
} else {
for (var i = 0; i < checks.length; i++) {
var check = checks[i];
check.checked = opt;
}
}
}
</script>
</body>
</html>