javascript - Accessing FormData Values -


i have formdata object create in javascript html form so. formdata object doesn't seem documented (it may me searching wrong things!).

var form = new formdata(document.getelementbyid("form")); 

my question

how access different input values of formdata object before send off? eg. form.name accesses value entered input name form.name.

it seems can't values of form element using formdata.

the formdata object lets compile set of key/value pairs send using xmlhttprequest. its intended use in sending form data, can used independently forms in order transmit keyed data. transmitted data in same format form's submit() method use send data if form's encoding type set "multipart/form-data".

however can achieve using simple javascript this

var formelements = document.forms['myform'].elements['inputtypename'].value; 

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -