I could not understand what this javascript line does.
chkBox.setAttribute("CheckList", range);
What is the "CheckList" attribute is used for?
I could not understand what this javascript line does.
chkBox.setAttribute("CheckList", range);
What is the "CheckList" attribute is used for?
There's no defined attribute called "CheckList" for input elements. Wherever that code is, it's setting a custom attribute on the element that it will likely access later. Some people choose this in favour of creating a global variable, but really you should stick to expando properties (if you want to avoid global vars), for example:
chkBox.CheckList = range;
In Internet Explorers before version 8, setAttribute incorrectly maps to properties instead of attributes anyway.