jquery - How to extract content from checkbox in javascript? -


i'm using function extract few data form:

$(document).ready(function() {       $('#btnenviar').click(function() {             var email = $('#email').val(); 

it's working, need extract content of list box, mark sign.

so put list box inside span id "idaevolta":

      <ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1; top: 0px; left: 0px; display: none;"></ul> <ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all" role="listbox" aria-activedescendant="ui-active-menuitem" style="z-index: 1; top: 0px; left: 0px; display: none;"></ul>   <input id="cbidavolta" type="hidden" name="cbidavolta" /> 

so far good, when try extract data:

var idaevolta = $("#idaevolta").html(); 

it not working.

update

while looking @ html ouput, chrome console, found:

<input type="checkbox" id="cbidavolta" name="cbidavolta" style="width: 35px; height: 35px; margin-left: 10px;"> 

does make things easier find solution?

udpate 2

it check box.

you have multiple elements id "idaevolta" ... span , input elements. id attributes must unique.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -