i have form with input field generated from loop, ie
<form name="" method='post' action=''>
<?php
for($i=0;$i<10;$i++){
echo "<input type='text' name='data[]' class='data_cls' value='".$i."'>";
}
?>
<input type='submit' id='btn' value='save'>
i want to submit the form using jquery ajax.
$('.btn').click(function(){
var datString = "HOW TO GET THESE VALUES";
$.ajax({
url: "data_process.php",
type: "post",
data: dataString,
success: function(data) {
alert('OK');
}
});
});