$('form').serialize() will generate something like a=1&b=2,but what I want to get is {a:1,b:2}.
How to do this?
Further more,is it possible to do this kind of job to arbitrary container like div?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
jQuery doesn’t support this. You’ll have to use JSON.stringify, which is supported in some modern browsers, but for support in older browsers, you have to include the json2 library as a
<script>You could then have something like:
Then use as follows: