<div class="codetitle"> <span><a style="CURSOR: pointer" data="61495" class="copybut" id="copybut61495" onclick="doCopy('code61495')"><u>코드 복사</u></a></span> 코드는 다음과 같습니다.</div> <div class="codebody" id="code61495"> <br>[html]<br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/ xhtml1-transitional.dtd"> <br><html xmlns="http://www.w3.org/1999/xhtml"> <br><머리> <br><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <br><title>JQuery表格内容过滤</title> <br><style type="text/css"> <br>테이블{ 테두리:0;border-collapse:collapse;} <br>div{font:normal 12px/17px Arial;} <br>td{font:normal 12px/17px Arial;padding:2px;width:100px ;} <br>번째{ 글꼴:bold 12px/17px Arial;text-align:left;padding:4px;border-bottom:1px solid #333;width:100px;} <br>.even{ 배경:#FFF38F; } /* 偶数行样式*/ <br>.odd{ background:#FFFFEE;} /* 奇数行样式*/ <br>.selected{ background:#FF6500;color:#fff;} <br></ 스타일> <BR><!-- 引入jQuery --> <br><script src="jquery-1.5.2.min.js" type="text/javascript"></script> <br><script type="text/javascript"> <br> $(function(){ <br> $("#filterName").keyup(function(){ <br> $("table tbody tr") <br> .hide() <br> .필터( ":contains('" ( $(this).val() ) "')") <br> .show() <br> }).keyup() <br> }) <br></ 스크립트> <br></head> <br><본문> <br> <div> <br/> 예: <input id="filterName" name="filterName" /> <br/> </div> <br> <테이블> <br> <머리> <br> <tr><th>유형명</th><th>성격</th><th>暂住地</th></tr> <br> </thead> <br> <tbody> <br> <tr><td>SYJ</td><td>男</td><td>河North秦皇岛市</td></tr> <br> <tr><td>이사</td><td>여자</td><td>북경북경시</td></tr> <br> <tr><td>王五</td><td>男</td><td>河北秦皇岛市</td></tr> <br> <tr><td>赵六</td><td>男</td><td>河北唐山市</td></tr> <br> <tr><td>张三</td><td>男</td><td>内蒙古呼和浩特市</td></tr> <br> <tr><td>王六</td><td>女</td><td>内蒙古包头市</td></tr> <br> <tr><td>two狗</td><td>男</td><td>북경북경시</td></tr> <br> <tr><td> Lee字</td><td>女</td><td>河North秦皇岛市</td></tr> <br> <tr><td>two蛋</td><td>男</td><td>东北辽宁省</td></tr> <br> </tbody> <br> </table> <br></body> <br></html> <br> </div>