2

The table cell has following content dynamically generated :

<a href="abc.com" target="_blank" specname="hyperlink" ><span tabindex="-1" ctx="2380" specname="textItem" >URL</span></a>

I am looping through the table cells using javascript and for hyperlinked cells, I want to obtain the url in the href section.

With

 <cell>.innerText // I can get the text part i.e. "URL" 
 <cell>.innerHTML // I get the complete content of the cell shown above.     
 <cell>.getAttribute('href') // doesnt work - returns undefined

Any ideas how can I get just the url in the href property.

Andreas
  • 21,535
  • 7
  • 47
  • 56
Amit Desai
  • 21
  • 1

0 Answers0