Skip to content

Commit

Permalink
Formatting the result of the script.
Browse files Browse the repository at this point in the history
  • Loading branch information
serbanghita committed Apr 6, 2018
1 parent 19363b7 commit 720f540
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions README.md
Expand Up @@ -24,29 +24,27 @@

> Using the DOM node id.

var result = formToObject('myFormId');
/*
console.log(result);
{
saveSettings: 'Save',
name: 'Serban',
race: 'orc',
settings: {
input: 'keyboard',
video: {
resolution: '1024x768',
vsync: 'on'
}
}
}
*/

formToObject('myFormId');

> Using the actual DOM Node reference.
formToObject(document.getElementById('myFormId'));

*Result*

{
saveSettings: 'Save',
name: 'Serban',
race: 'orc',
settings: {
input: 'keyboard',
video: {
resolution: '1024x768',
vsync: 'on'
}
}
}


> XHR - sending form data
Expand Down

0 comments on commit 720f540

Please sign in to comment.