1

I've tried to provide table with hyperlink

$.each(value, function(index, value){
    $("#myTable > thead").append("<tr><a href='/query/"+value.account_id+"'><td>"+value.first_name+"</td><td>"+value.address1+value.address2+value.address3+"</td></a></tr>");
});

which is not working, and I tried the following:

$.each(value, function(index, value){
   $("#myTable > thead").append("<a href='/query/"+value.account_id+"'><tr><td>"+value.first_name+"</td><td>"+value.address1+value.address2+value.address3+"</td></tr></a>");
});

It is working but it collapses my table or there is no table at all. It renders like paragraph. What's going wrong?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
m2j
  • 1,152
  • 5
  • 18
  • 43

0 Answers0