个人学习记要 _新手

个人学习记录 _新手input typebutton onclickchangeBoxes(1) valueselect all /input typeb

个人学习记录 _新手
<input type="button" onclick="changeBoxes(1)" value="select all" />
<input type="button" onclick="changeBoxes(-1)" value="invertselection" />
<input type="button" onclick="changeBoxes(0)" value="select none" />

for(var i=0;i<elms.length;i++){
    if(elms[i].type!='checkbox'){continue;}
    elms[i].checked=action<0?(elms[i].checked?0:1):action;
  }