PageSourceSearch

https://litgid.com/local/templates/main_page/js/checkbox.js?17193141811373

js litgid.com collected 2026-10-01 11:39:48 UTC 1,373 bytes, 51 lines download raw bytes

1function changeCheck(el)
2/* 
3	функция смены вида и значения чекбокса
4	el - span контейнер дял обычного чекбокса
5	input - чекбокс
6*/
7{
8     var el = el,
9          input = el.getElementsByTagName("input")[0];
10		
11     if(input.checked)
12     {
13	    el.style.backgroundPosition="0 0"; 
14		input.checked=false;
15     }
16     else
17     {
18        el.style.backgroundPosition="0 -19px"; 
19		input.checked=true;
20     }
21     return true;
22}
23function startChangeCheck(el)
24/*
25	если значение установлено в on, меняем вид чекбокса на включенный
26*/
27{
28	
29	if(el!= null)
30	{
31		var el = el,
32			input = el.getElementsByTagName("input")[0];
33		if(input.checked)
34		{
35			el.style.backgroundPosition="0 -19px";     
36		}
37    return true;
38	}
39}
40
41function startCheck()
42{
43	/*
44		 при загрузке страницы заменяем проверяем значение чекбокса в указанном контенере.
45		 если чекбоксов несколько, нужно будет несколько раз вызвать функциую с нужными id
46	 */
47	startChangeCheck(document.getElementById("niceCheckbox1"));
48	startChangeCheck(document.getElementById("niceCheckbox2"));
49}
50
51window.onload=startCheck;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.