How not to select a particular form element?

0

Hello, I would like my form not to select FILE_VALUE, but even using .not () it still returns a form with FILE_VALUE.

var $form = $("#frmParcelas");
var formSemCampoValor = $form.not('#CAMPO_VALOR');
console.log(formSemCampoValor);

Thank you in advance for the help.

    
asked by anonymous 11.03.2016 / 16:53

1 answer

1

Hello, I hope the example below will help you, hugs.

<html>
<head>
<script src="js/jquery-1.11.2.min.js"></script>
</head>
<body>

<form id="frmParcelas">
    <input type="text" value="oi" id="oi"/>
    <input type="text" value="oie" id="oie"/>
    <input type="text" value="" id="deuruim"/>
</form>

    <script>
        var $form = $("#frmParcelas");
        var formSemCampoValor = $('input:not([value]),input[value=""]').css('border', 'solid 1px red');
    </script>

</body>
</html>
    
11.03.2016 / 17:20