I would like to convert an entire form of data to a javascript object.
<form id='myform'>
<input type='text' name='field1' value='foo'>
<input type='text' name='field2' value='bar'>
</form>
would convert to a javascript object...
{
field1: 'foo',
field2: 'bar'
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…