Check all Checkboxes in Page via Developer Tools

后端 未结 8 1320
野性不改
野性不改 2021-01-30 05:13

I have a loop that creates 20 check-boxes in the same page (it creates different forms). I want via chrome developer tools to

8条回答
  •  醉梦人生
    2021-01-30 05:45

    If you're here for the quick one-liner:

    var aa = document.getElementsByTagName("input"); for (var i = 0; i < aa.length; i++) aa[i].checked = true;
    

提交回复
热议问题