How to define unchecked value to checkbox?
<p>I'm trying to set a default value for 'unchecked', but is not working. I wanted it. If checked stores = 'Yes', if unchecked stores = 'No'. I do not know why not be working. The inputs in database are inserted always with value 'Yes'. Even though they checked or unchecked.</p>

<pre><code>&lt;input type="hidden" name="imagem" value="no" /&gt;
&lt;input id="imagem" type="checkbox" value="yes" &gt;Imagem&lt;br /&gt;

&lt;input type="hidden" name="som" value="no" /&gt;
&lt;input id="som" type="checkbox" value="yes" &gt;Som&lt;br /&gt;

&lt;input type="hidden" name="animacao" value="no" /&gt;
&lt;input id="animacao" type="checkbox" value="yes" &gt;Animação&lt;br /&gt;


&lt;button type="button" id="enviar"&gt;Cadastrar&lt;/button&gt;&lt;br /&gt;

&lt;script src="http://code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
&lt;script&gt;
    $( document ).ready(function() {
        $( "#enviar" ).click(function() {
            var vjson = {};
            $( "input" ).each(function( index ) {
                vjson[$( this ).attr("id")] = $( this ).val();
            });
             // console.log(JSON.stringify(vjson));
              $.post('&lt;%=request.getContextPath()%&gt;/testeform', { json: JSON.stringify(vjson), email : vjson.email}, 
                    function(returnedData){
                         console.log(returnedData);
                });
        });
    });
&lt;/script&gt;
</code></pre>