Javascript and only one Checkbox - undefined

后端 未结 8 1190
爱一瞬间的悲伤
爱一瞬间的悲伤 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 12:04

    jQuery is your friend:

    $("input[type='checkbox']").attr('checked', false);
    

    (... if jQuery is available to you?)

提交回复
热议问题