开发者

How can I serialize form state in Javascript/jQuery between AJAX requests?

I know how to serialize a form:

$("#attributeform").serialize()

but I want to store this in some kind of variable, like a hash, so that开发者_StackOverflow社区 I can retrieve these values and resubmit them in order to transition between states.


I think you are looking for serializeArray instead. It produces an array where you can save and edit.


Actually I was able to use a simple hashtable for this. I didn't want to mess with serializeArray because I was actually looking not to hash the form values, but to hash the serialized form to ANOTHER value. Sorry if I wasn't clear.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜