i getting html table in jquery ajax response
$.ajax({ url: '/ajaxexecute.aspx?fn=getfee', type: 'post', context: document.body, cache: false, success: function (response) { alert(response); });
response contains following table
<table border="1" id="tbl1" border="0" style="margin-left:30px;"> <thead> <tr> <th>fee_type</th><th>fee_amount</th><th>from_amt</th><th>to_amt</th><th>fee_percent</th><th>higher_of_two</th><th>max_capture</th><th>min_capture</th> </tr> </thead> <tbody> <tr> <td>0</td><td>5</td><td>0</td><td>0</td><td>0.00</td><td>0</td><td>0</td><td>0</td> </tr> </tbody> </table>
i want first row first td value i.e. 0
response.find('td').html();
in console getting error object response has no method 'find'
you can use .eq selector
$(response).find('tbody td:eq(0)').html();
Comments
Post a Comment