Do it like this
$('input[type=submit]').click(function(){
var alldata = "";
$('span').each(function(){
var $span = $(this);
var spanTxt = $span.text();
alldata += spanTxt + " ";
});
alert(alldata);
});
Here all data has all the spans text
Here i have used some extra variable for showing current span their text for understanding, you can loose them up if you want
solved Get data from multiple span using jquery