JSFiddle - React, Tailwind, and code Playground
HTML
<form><input name="test" type="text" value="test"/><input type="text" name="test2"/></form>
JavaScript
var form = document.getElementsByTagName('form')[0];
for (var input in form)
{
if((form[input].nodeType !== undefined) && form[input].nodeType == 1)
console.log(form[input].value);
}