<script src="http://code.jquery.com/jquery-latest.js"></script>
<table id="product_table">
<tr class='click'>
<th class='name'>
Name
</th>
<th class="count">
Count
</th>
<th class='price'>
Price
</th>
<th class='dis_price'>
Discount price
</th>
<th class='discount'>
Discount
</th>
</tr>
</table>
<script>
var arrTh=[]
$("#product_table .click th").each(function() {
arrTh.push($(this).attr('class')+"="+$.trim($(this).text()));
});
alert(arrTh.join(',\n'))
</script>