<html>
<head>
</head>
<body id="body">
<form method="GET" action="">
<input type="button" value="Go" onclick="doIt()">
</form>
<script>
function doIt(){
var form = document.forms[0]; // get first form or adjust accordingly
for (var i = 0; i < form.elements.length; i++){
console.log(form.elements[i].value);
}
}
</script>
</body>
</html>