'선택기 필터 - contains필터'를 사용해서 특정 텍스트 검색하기
[Contains.htm]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>특정 텍스트 검색</title>
<style type="text/css">
.redColor { color:Red; }
</style>
<script src="js/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
//[1] td 태그내의 텍스트가 RedPlus를 포함하는 요소를 검색 후 배경색을 Red
$("td:contains('RedPlus')").addClass("redColor");
});
</script>
</head>
<body>
<table>
<tr>
<td>RedPlus.NET</td>
</tr>
<tr>
<td>DotNetKorea</td>
</tr>
<tr>
<td>Hawaso</td>
</tr>
</table>
</body>
</html>
-------------------------------------------------------------------------------------
[실행결과]