반응형
eq(index) : n번째 인덱스의 요소를 가져옴
01.Eq.htm |
<html xmlns="http://www.w3.org/1999/xhtml"> <head>
<title>n번째 요소 가져오기</title>
<script src="../jQuery/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function()
{ //alert($('p').html()
하면 첫번째만 읽어온다. alert($('p').text()); //선택기 필터 alert($('p').html()); //메서드
});
</script> </head> <body>
<p>C#</p>
<p>ASP.NET</p>
<p>jQuery</p> </body> </html> |
결과화면 |
[그림33-1] |
반응형
'jQuery | javascript | CSS' 카테고리의 다른 글
35.jQuery - Not ( 04.Traversing - 03.Not) (0) | 2009.11.11 |
---|---|
34.jQuery - Is ( 04.Traversing - 02.Is) (0) | 2009.11.11 |
-- 현재 까지의 jQuery 소스3 -- (0) | 2009.11.10 |
32.jQuery - Val ( 03.Attributes - 06.Val.htm ) (0) | 2009.11.10 |
31.jQuery - Text ( 03..Attributes - 05.Text ) (0) | 2009.11.10 |
Comments