<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$("#btnExactMatch").live("click", function () {
var matches = "";
$("a[href='" + $("#txtSearchTerm").val() + "']").each(function () {
matches += $(this).text() + "\r\n";
});
alert(matches);
});
$("#btnLikeMatch").live("click", function () {
var matches = "";
$("a[href*='" + $("#txtSearchTerm").val() + "']").each(function () {
matches += $(this).text() + "\r\n";
});
alert(matches);
});
</script>
</head>
<body>
<form id="form1">
<input type = "text" id = "txtSearchTerm" />
<input type = "button" id = "btnExactMatch" value = "Exact Match" />
<input type = "button" id = "btnLikeMatch" value = "Like Match" />
<br /><br />
<a href = "http://www.aspsnippets.com">ASPSnippets</a><br />
<a href = "http://www.aspforums.com">ASPForums</a><br />
<a href = "http://www.jqueryfaqs.com">jQueryFAQs</a><br />
</form>
</body>
</html>