What is the form.serialize equivalent in JQuery if there is one?
$('person-example').serialize()
// -> 'username=sulien&age=22&hobbies=coding&hobbies=hiking'
$('person-example').serialize(true)
// -> {username:开发者_JAVA技巧 'sulien', age: '22', hobbies: ['coding', 'hiking']}
It's the same, however you have to put #
before your selector to select certain ID
$('#person-example').serialize();
精彩评论