0

this table dont have a id,class, i want get the content

<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="14%" height="25">FullName:</td>
<td width="86%">kannan</td>
</tr>
<tr>
<td height="25">email</td>
<td>kanna@sample.com</td>
</tr>
</tbody>
</table>
3
Contributors
4
Replies
26
Views
3 Years
Discussion Span
Last Post by diafol
0

Hi,
You can do that using Javascript

//That give you all tables on page
//var tables = document.getElementByTagName("table");
//You must know how mutch tables are in page
//If this the first table on page you can use


var mytable = document.getElementByTagName("table")[0];
//Now the rows
var rows = mytable.getElementByTagName("td");
for(var i=0; i<rows.lenght; i++)
{
    //....do somthing with content
    alert(rows[i].innerHTML);
}
0

Sounds as though you're scraping data from an external site. Otherwise, if its your data, just give an id attribute to the relevant tds.

0

yes i want to extract data from one website

I don't understand. Are you extracting from your website or somebody else's website?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.