I'm trying to disable every type of input on a page and uncheck or empty the values, so I've written then following code:-
function disableAll() {
                  if ($('#chkLoginEnabled').is(':checked')) {
                      $("input").attr("disabled", false);
                  }
                  else {
                      $("input").attr("disabled", true);
                      $("input checkbox").attr('checked') = 'checked';
                      $("input textbox").val() = "";
                  }
                  $("#chkLoginEnabled").attr("disabled", false);
                }
It works to disable all the inputs (and correctly re-enables the one I need),
However, it doesn't reset any of the inputs.
 
     
     
     
     
     
    