I'm getting all the values from a form using serialize()
and send them through a Ajax call using $.post()
as follow:
$('button#btnBuscar').on('click', function (ev) {
ev.preventDefault();
$.post('someRoute', $('#buscadorNorma').serialize(), 'json')
.done(function (data, textStatus, jqXHR) {
console.log(data.entities);
})
.fail();
});
After click the submit button I check the POST data (in Firebug) send to the route and I notice that only the last parameter was taken in this case comite_tecnico
but what about the rest of them? Even if have values isn't send at all, why? I leave a fiddle for testing purpose, can I get some help?
This is a image showing the results:
Note: for check the POST data use Firebug or any other tool!
将name
属性添加到您的输入元素中,如下所示:
<input type="text" id="codigo_norma" name="codigo_norma" class="form-control">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.