I am trying to trigger an onclick event via Chrome Developer Tools that will check all checkboxes on the page and also trigger the onclick event of all checkboxes on the page.
Here is a sample checkbox on the page:
<input type="checkbox" onclick="ctl00_ContentAreaHolder1_uctlLocationSelectionControl_AccountStructureTreeView.HandleCheck(this,'p_686660',4);" name="checker_p_686660">
Here is my code to check all checkboxes on the page:
(function() {
var aa= document.getElementsByTagName("input");
for (var i =0; i < aa.length; i++){
if (aa[i].type == 'checkbox')
aa[i].checked = true;
}
})()
The only thing I cannot figure out is how to trigger the onclick event when the checkbox is checked. Any help is appreciated!