Prototype Form.serialize()
This serializes the name, not the id of the element(s).
In these examples from the prototype docs, the element name is "username", "age", "hobbies". The form id="
person-example
".
$('person-example').serialize()
// -> 'username=sulien&age=22&hobbies=coding&hobbies=hiking'
$('person-example').serialize(true)
// -> {username: 'sulien', age: '22', hobbies: ['coding', 'hiking']}
No comments:
Post a Comment