deharvy
asked on
Search Page For String Within HREF
I need javascript code that will search all the links on the page and then search for a string value within the href.
Here is an example of the link: <a href="http://www.sample.com/index.jsp?UserIDExample=1111111">
-----------------
Here was my failed attempt:
if ( document.getElementsByTagN ame('a').h ref.indexO f("UserIDE xample") > -1 ) {
alert("found");
else
alert("not found);
}
Here is an example of the link: <a href="http://www.sample.com/index.jsp?UserIDExample=1111111">
-----------------
Here was my failed attempt:
if ( document.getElementsByTagN
alert("found");
else
alert("not found);
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER