多重选择框jQuery和岗位连载 [英] multiple select box jquery and post serialize
本文介绍了多重选择框jQuery和岗位连载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过邮寄形式,但我多次选择框没有被发送。我怎样才能用表格的其余部分序列的选择框,把它?
I am trying to to send a form via post but my multiple select box isn't being sent. How can I serialize the select box with the rest of the form and send it?
下面是我使用的JavaScript
Here is the javascript I am using
$('#form-to-submit').empty().append($(fieldsetName).clone());
$('#form-to-submit select').val($('.fieldsetwrapper select').val());
var data = $('#form-to-submit').serialize();
$.post(url,{data,function(data,textStatus){
我得到的所有字段,但选择在后的数据。
I get all fields but the select in the post data.
推荐答案
订做的话有选择的选择将只序列...见
The select will only serialize if there are selections made... see
下面是序列化和jsonification为例 http://jsfiddle.net/XW2Cm/1/
Here is an example with serialization and jsonification http://jsfiddle.net/XW2Cm/1/
这篇关于多重选择框jQuery和岗位连载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文