Javascript and only one Checkbox - undefined

后端 未结 8 1193
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-18 11:11
for (i = 0; i < document.checks.user.length; i++) //for all check boxes
{
    if (document.checks.user[i].checked == true )
    {
        document.checks.submit()         


        
8条回答
  •  说谎
    说谎 (楼主)
    2021-01-18 11:54

    I'd probably iterate across document.checks.elements, looking for .type == 'checkbox'.

提交回复
热议问题