input values to array .join()
HTML
<table width="100%" border="1" cellspacing="0" cellpadding="5">
<tr id="1">
<td width="20%">
<input type="checkbox" name="checkbox" id="checkbox" />
<input type="hidden" name="part" id="part" value="12345" />
<input type="hidden" name="lc" id="lc" value="AAA" />
</td>
<td>Qty:
<input type="text" name="qty" id="qty" value="1" size="2" />
<td width="80%">AAA 12345</td>
</tr>
<tr id="2">
<td width="20%">
<input type="checkbox" name="checkbox" id="checkbox" />
<input type="hidden" name="part" id="part" value="54321" />
<input type="hidden" name="lc" id="lc" value="BBB" />
</td>
<td>Qty:
<input type="text" name="qty" id="qty" value="1" size="2" />
<td width="80%">BBB 54321</td>
</tr>
<tr id="3">
<td width="20%">
<input type="checkbox" name="checkbox" id="checkbox" />
<input type="hidden" name="part" id="part" value="999" />
<input type="hidden" name="lc" id="lc" value="CCC" />
</td>
<td>Qty:
<input type="text" name="qty" id="qty" value="1" size="2" />
<td width="80%">CCC 999</td>
</tr>
<tr id="4">
<td width="20%">
<input type="checkbox" name="checkbox" id="checkbox" />
<input type="hidden" name="part" id="part" value="67890" />
<input type="hidden" name="lc" id="lc" value="DDD" />
</td>
<td>Qty:
<input type="text" name="qty" id="qty" value="1" size="2" />
<td width="80%">DDD 67890</td>
</tr>
<tr id="5">
<td width="20%">
<input type="checkbox" name="checkbox" id="checkbox" />
<input type="hidden" name="part" id="part" value="45678" />
<input type="hidden" name="lc" id="lc" value="EEE" />
</td>
<td>Qty:
<input type="text" name="qty"...
JavaScript
$("#button").click(function () { // click it
var str = [ KPI: [ Sales_Before_Refunds: '2 • 1',
Refunds: '$0 • 0 • 0.00%',
'Average_Revenue_Sale • Per_Day': '$2.00 • $0.00',
Subscriptions: '1a • 0n • 0c • 0f • 0s',
Frequency__one_sale_every: 2183 ],
GridData: [ { id: 1,
account_id: 2,
contact_id: 4,
affiliate_id: null,
source: 'PayPal',
source_transaction_id: '562020516R714110J',
invoice_id: '',
trans_date: '2014-02-18',
type: 'S',
source_type: 'Recurring Payment Received',
status: 'Completed',
currency: 'USD',
amount: 2,
shipping: 0,
insurance: null,
discount: 0,
tax: 0,
commission: 0,
fees: 0,
net: 0,
quantity: 1,
date_field_1: null,
date_field_2: null,
settled_amount: 2,
num_field_2: null,
text_field_1: '[email protected]',
text_field_2: '',
text_field_3: '',
text_field_4: '',
text_field_5: null,
text_field_6: '',
text_field_7: '',
text_field_8: '',
text_field_9: '',
text_field_10: '',
text_field_11: '',
text_field_12: '0',
note: '',
subscription_id: 'I-76KAPTJDPPDS',
original_total_amount: null,
got_detail: 1,
name: 'Nirav Mehta\'s Test Store',
email: '[email protected]',
address1: 'Nirav Mehta\'s Test Store',
address2: '1Test address',
city: 'San Jose',
state: 'CA',
zip: '95131',
country: 'United States' } ]];
alert(str.join());
}); // click function