checkbox is always “on”

后端 未结 8 1294
抹茶落季
抹茶落季 2021-01-07 16:32

Hy!

When Uploadify send the file to the action, I need to know if the checbox is checked or not, so I did:

    $(\'#uploaded\').uploadify({
        \         


        
8条回答
  •  走了就别回头了
    2021-01-07 16:52

    There is a pretty handy way to check all these element properties like disabled, checked, etc. with the prop function. This also converts it to boolean:

    $('#checkbox').prop('checked'); // -> true/false
    $('#checkbox').prop('disabled'); // -> true/false
    

提交回复
热议问题