how can i get all input fields values to an array in jquery?
please see my codes bellow:
<input type="text" name="a" value="a" />
<input type="text" name="b" value="hello" />
<input type="text" name="c" value="world" />
<script type="text/javascript">
function get_fields_values(){
// too much code
var arr=[];
$.each($("input"),function(i,n){
arr.push(n.value)
});
return arr;
// is there any jquery method to get fields values to an array?
// $('input').xxx() ?
}
</script>
<form>element with.serializeArray().