开发者

JQuery equivalent in prototype

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();
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜