Link to home
Start Free TrialLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

Check link's validity with JavaScript

<a href="http://www.example.com" id="L523136">Link to Example</a>

Using JavaScript at the bottom of my page how can I test if the link is to http://www.example.com and the link text is "Link to Example" ?

I want False to be returned if either the link or the link text has been changed.
ASKER CERTIFIED SOLUTION
Avatar of agriesser
agriesser
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hankknight

ASKER

Thank you, agriesser.

Your example works on its own but when I tried to integrate it into my app it does not work in IE.

I posted a question about that here:
https://www.experts-exchange.com/questions/23508640/JavaScript-link-validation-does-not-work-in-IE.html