How I take the value of a checkbox to go through parameter

Asked

Viewed 48 times

0

I wonder how I get the status of a checkbox if it is enabled or not to pass by parameter to the controller

Estou fazendo isto, mais toda hora vem "True"

1 answer

0


If the idea is to check if the check in is marked, the query should be done as below:

var checkado = $("#chkAguardandoEnvio").prop("checked");

If it is known whether the check in is enabled for marking, use this other:

var habilitado = $("#chkAguardandoEnvio").attr("disabled") != undefined;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.