复制代码 代码如下: <script language=javascript> //第一种方法 function selectall1() { var a = document.getElementsByTagName("input"); if(a[0].checked==true){ for (var i=0; i<a.length; i++) if (a[i].type == "checkbox") a[i].ch
crir = { init: function() { arrLabels = document.getElementsByTagName('label'); searchLabels: for (var i=0; i<arrLabels.length; i++) { // get the input element based on the for attribute of the labe