PDA

View Full Version : JavaScript to hit the html link and get the tag value



Devaraj A
01-05-2015, 05:50 PM
Hi All,

I am New to Java Script. i have a link "https://gradan1:32413/sco/mon/abc.html". (i Have many links like that so i cant hard code the Source code of html tag)
i need to hit the link and want to check particulat tag value.
<td>15.02.0.10</td>
This tag value will be keep on changing. i need a Java script which helps me to fetch the value "15.02.0.10".

Thank you in Advance!

Devaraj A

molendijk
01-06-2015, 01:44 PM
Do you mean something like this?


<table>
<tr>
<td id="check_it">15.02.0.10</td>
</tr>
</table>

<a href="javascript: void(0)" onclick="alert(document.getElementById('check_it').innerHTML); return false">check</a>