开发者

jquery serialize a dynamic form

开发者 https://www.devze.com 2023-03-18 15:47 出处:网络
I have this form: http://jsfiddle.net/michelejs/Pt6LQ/ The problem is that I am not be able to serialize the content form in json format whit the function serializeArray.

I have this form: http://jsfiddle.net/michelejs/Pt6LQ/

The problem is that I am not be able to serialize the content form in json format whit the function serializeArray.

In the function a a开发者_运维百科rray is still empty.

Can you help me?

Thank you very much.


For a form element to be serialized, its "name" attribute must be defined. Add the names and it should be ok.

From jQuery Serialize Documentation:

the element cannot be disabled and must contain a name attribute.

0

精彩评论

暂无评论...
验证码 换一张
取 消