This is a a simple code to check form input fields names and its value using javascript

for( var i=0; i<document.forms.FORM_NAME.length; i++ )
		{
		   var fieldName = document.forms.FORM_NAME[i].name;
		   var fieldValue = document.forms.FORM_NAME[i].value;

		   // use the fields, put them in a array, etc.

		   // or, add them to a key-value pair strings, 
		   // as in regular POST

		   console.log(fieldName + '=' + fieldValue + '');
		}

Put this code inside your javascript function or where you u want to check.