Javascript examples for jQuery:Selector
Select fields with names
<html> <head> <script src="https://code.jquery.com/jquery-1.7.1.min.js"></script> <script> $(document).ready(function(){ $('input[name^="employee[name]"]').each(function() { console.log($(this).val()); });//w w w.ja va 2s . c o m }); </script> </head> <body> <form> <input type="text" name="employee[name][]" value="value1"> <input type="text" name="employee[name][]" value="value2"> </form> </body> </html>