Fijate así:
Código PHP:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<script>
function getData(formId){
var f=document.getElementById(formId),e,i,r='';
for(i=0;e=f.elements[i];i++){
r+=e.name+'='+escape(e.value)+'&';
}
return r.substr(0,r.length-1);
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<input type="text" name="textfield" id="textfield" />
<input type="text" name="textfield2" id="textfield2" />
<input type="text" name="textfield3" id="textfield3" />
<input type="button" name="button" id="button" value="Botón" onclick="alert(getData('form1'))" />
</form>
</body>
</html>
Cocamos con _cronos2 :)