Convert DOM <form> to JavaScript object.