यदि कोई बटन चुना गया है तो मुझे पंक्ति में तालिका डेटा प्राप्त करने में समस्याएं आ रही हैं। मेरे पास दो बटन स्वीकृत हैं और इनकार करते हैं और किस बटन पर क्लिक करते हैं, मैं क्वेरी का उपयोग कर डेटा को पकड़ना चाहता हूं। पंक्ति संख्या और सामान केवल पंक्ति डेटा नहीं प्राप्त कर सकते हैं। मुझे आईडी और परीक्षक प्राप्त करने की आवश्यकता है।उस पंक्ति के लिए बटन क्लिक करके jquery का उपयोग कर पंक्ति डेटा प्राप्त करें
यहाँ मैं
<table id="mytable" width="100%">
<thead>
<tr>
<th>ID</th>
<th>Tester</th>
<th>Date</th>
<th>Approve</th>
<th>Deny</th>
</tr>
</thead>
<tbody>
<tr class="test">
<td class="ids">11565 </td>
<td class="tester">james</td>
<td>2012-07-02 </td>
<td><Button id="Approved" type="submit" >Approved</button>
</td>
<td><Button id="deny_0" type="submit" >Denied</button>
</td>
</tr>
</tbody>
</table>
यहाँ टीआर और टीडी संख्या प्राप्त करने के लिए अपने जावास्क्रिप्ट है क्या है है, लेकिन मैं यह कैसे उपयोग करने के लिए मैं क्या जरूरत है पाने के लिए यकीन नहीं है
$(document).ready(function() {
/*$('#cardsData .giftcardaccount_id').each(function(){
alert($(this).html());
}); */
$('td').click(function(){
var col = $(this).parent().children().index($(this));
var row = $(this).parent().parent().children().index($(this).parent());
alert('Row: ' + row + ', Column: ' + col);
// alert($tds.eq(0).text());
console.log($("tr:eq(1)"));
// $("td:eq(0)", this).text(),
});
});