复选框始终处于“启用"状态. [英] checkbox is always "on"

查看:110
本文介绍了复选框始终处于“启用"状态.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

Uploadify将文件发送到操作时,我需要知道是否选中了复选框,所以我做了:

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

    $('#uploaded').uploadify({
        'uploader': '/uploadify.swf',
        'cancelImg': '/cancel.png',
        'script': '/Interaction/Upload',
        'multi': true,
        'auto': false,
        'method': 'post',
        'scriptData': {'Checkbox': $('#checkbox').val()},
    });

但是我离开却获得了成功"的价值.不管是否检查.

But I aways get an "on" value. No matter if is checked or not.

有人可以帮忙吗?谢谢.

can anyone help? Tks.

更新:

我意识到页面加载时uploadify正在获取复选框.这意味着,如果我更改复选框(或任何其他类型的输入),则uploadify将获得初始值,在这种情况下为"checkbox = false"

I realized that uploadify is getting the checkbox when the page is loaded.This means that if I change the checkbox (or any other type of input) the uploadify will get the initial value, in this case, "checkbox = false".

如何使用uploadify发送表单?

How can I send a form with uploadify?

Tks.

推荐答案

尝试$('#checkbox').is(':checked')

这篇关于复选框始终处于“启用"状态.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆