javascript onclick push to array and keeping the old element code example
Example: on.click save to array
<input type="checkbox" onclick="CheckBoxShortList('a','b','c');">
<input type="checkbox" onclick="CheckBoxShortList('a','b','c');">